Php increase the realt value to the memory

Hello everyone, could someone please tell me how to increase the value relating to the memory to be allocated pertphp 73? Thank you

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 3827336 bytes) in /usr/share/nextcloud/lib/private/Files/Storage/Local.php on line 269

In general you can change the allocated memory in the Web server > Virtual hosts [List] > Edit > Advanced settings page, as [briefly] explained here

PHP settings can also be adjusted for a specific web site from the Virtual hosts page

For NextCloud I guess the procedure is a bit different…


Very much so, especially since that email is coming from the Nextcloud cron job*. To fix that, edit /etc/cron.d/nextcloud to read:

*/5 * * * *   apache /usr/bin/scl enable rh-php73 -- php -dmemory_limit=512M -f /usr/share/nextcloud/cron.php

*How do I know that? Because the default was increased long ago to 512M for any web access, but not for the cron job. The error OP is seeing indicates it’s still at its default of 128M, which means web access isn’t involved, hence the cron job.


:heart_eyes: Just one :heart: is not enough for your catch!

I guess a PR is now welcome!


Thanks, I saw in the options that the limit is set at 128, but pe rnexcloud as you write it is different … Thanks

1 Like