Hi! I need som help regarding memory_limit. i now get this
Allowed memory size of 134217728 bytes exhausted (tried to allocate 2363088 bytes) at /usr/local/www/nextcloud/lib/private/Files/Storage/Local.php#272
and my CRON has stoped woking and i belive its because of this as well.
I have set “memory_limit = 1G” and also tried with 1024M and looked thru all config files i can find and googled and tried adding to .htaccess as found regarding owncloud. but no luck.
i am using NC20 but started with NC 17 and have always had this problem but now its starting to make problems by using NC.
I have now PHP 7.4 but started with 7.3
My NC is in a Jail under Truenas
did you check the variable in the actually loaded php.ini?
Best way to find this is: create a php file and add the following code:
<?php phpinfo(); ?>
and open it in browser, it will show the file which is actually being read!
i tried that and it loads the php.ini and says memory_limit 1G and i set the 128 opache memory to 1024 as well but no difference. it just like if Nextcloud itself is looking at another parameter.
it looks like it limited to the user www, but there is no change when i edit www.conf
On my setup there is another ini file in “/etc/php/7.3/apache2/conf.d/” called “98-dietpi-nextcloud.ini” overriding the existing mem-limit.
I tried to create an extra conf in php-fpm.d folder but no difference on that either.
It’s not the jail itself that is limited. It’s the user www that doesn’t respond to settings in php.ini php-fpm.conf or www.conf.
If I set the memory limit in cli command it works but only that run.
Update: i looks like this is a CLI issue. when setting up a php info page that is owned by www it now shows 1G but on cli its still 128M. I dont have any x/x/php-cli.conf
If you look for the ini file for the CLI, you can easily get this from phpinfo() or you even shorter:
echo "<?php echo php_ini_loaded_file(); ?>" | php