Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved InvoiceNinja

    Invoice Ninja
    3
    8
    489
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tamayers last edited by

      Hello! I am trying to import a JSON file backup into InvoiceNinja but I am getting a 500 error during the upload. It appears from the logs that the php memory limit for the app is being hit:

      PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /app/code/app/Services/ImportService.php on line 284
      

      How can I edit the PHP memory limit for Invoice Ninja in the Cloudron App?

      1 Reply Last reply Reply Quote 0
      • nebulon
        nebulon Staff last edited by

        Hi there,

        you can adjust the upper memory limit via the Cloudron dashboard. In the advanced tab of the app configure dialog you have a slider to do so.

        Best,
        Johannes

        1 Reply Last reply Reply Quote 0
        • T
          tamayers last edited by

          @nebulon Thank you. I have done that but I am still running it issues. I have set over 2GBs to the app in the advanced tab but it appears that PHP is still limited to 128MB. I need a way to up that memory...

          Typically, I would do that in the .htaccess file but it appears those are read-only on Cloudron...? How else can I up the PHP memory limit?
          php_value memory_limit 2048M

          1 Reply Last reply Reply Quote 0
          • nebulon
            nebulon Staff last edited by

            Sorry for the late reply. Indeed the php memory limit is fixed for the app.
            Currently the only way to temporarily change that, is to use the cloudron cli tool and reconfigure the app with cloudron configure --app <id/domain> --debug then open a remote terminal into the app with cloudron exec --app <id/domain> and change the value in the php.ini. Then manually start the app from that remote terminal with /app/code/start.sh and perform the import. Once done reconfigure the app again to be in production state with cloudron configure --app <id/domain> --no-debug

            Arguably this is far from convenient and likely error prone, not sure how we could solve such burst memory requirements more elegantly.

            murgero 1 Reply Last reply Reply Quote 0
            • T
              tamayers last edited by

              @nebulon Running into this same issue on NextCloud... the install is limiting the PHP memory limit to 128mb.. NextCloud recommends at least 512mb. There REALLY needs to be a way to adjust this limit for the app.

              1 Reply Last reply Reply Quote 0
              • murgero
                murgero App Dev @nebulon last edited by

                @nebulon You could have the configuration step make the memory limit 50-75% what the current memory is but then max it at some point (say we max it at 128MB):

                Examples:

                Setup 1: App memory set to 256MB, php memory limit would be 128MB.

                Setup 2: App memory set to 512MB, php memory limit would be 128MB.

                Setup 3: App memory set to 128MB, php memory limit would be 64MB.

                So on and so on.

                --
                https://urgero.org
                ~ Professional Nerd. Freelance Programmer. ~
                Matrix: @murgero:urgero.org

                1 Reply Last reply Reply Quote 0
                • nebulon
                  nebulon Staff last edited by

                  That is a good idea and the ratio should probably depend on the app. I mention this, since Nextcloud has a similar issue to be solved.

                  1 Reply Last reply Reply Quote 0
                  • nebulon
                    nebulon Staff last edited by

                    An app package version which follows your proposal of 50% memory limit setting for PHP was just published. Does it work for you as expected now?

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Powered by NodeBB