• 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?

  • 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.


  • @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

  • 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/ 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.

Log in to reply