This also worked for me on Debian Stretch on a VPS at Digital Ocean, using php7.3 with sury repository. Thanks, oemb1905
- change memoy_limit in /etc/php/7.3/fpm/php.ini for 512M
- systemctl restart apache2
- service php7.3-fpm restart
That’s all for me.
JeromeSi’s post was what fixed this for me. These PHP settings are all over the place.
Yes! Correct! If you using PHP-FPM it is need to restart both.
Just change/set the
memory_limit = 512M from the
sudo /etc/init.d/apache2 restart
sudo /etc/init.d/php7.3-fpm restart
I have php 7.3 and the command
sudo -u www-data php7.3 -i | grep memory_limit
memory_limit => -1 => -1
NO LIMIT ! but I still have the message"The PHP memory…" BUG? or did I miss something?
Guys, create a mod instead of editing all single
php.ini files: Die Meldung "PHP-Speichergrenze liegt unterhalb des empfohlenen Wertes von 512MB." verschwindet nicht!
Since one can set a priority, this as well assures that any other or future drop-in config cannot override this setting.
php.ini settings are always overridden by any drop-in config or mod.
For PHP 7.3 change /etc/php/7.3/fpm/php.ini
The cli php.ini made no difference.
I do not want to increase PHP memory for all users.
Adding this line to user.ini worked fine in NC 15:
memory_limit = 512M
But now this file get’s an error while the checksum is incorrect.
And even worse, after each update this file is overwritten by the update.
So there should be an alternative way to set this option per NC installation, without loosing this setting each update and without getting a checksum failure notification.
The checksum failure seems gone now. But not the overwriting of the existing file. Where do I have to put these custom settings to avoid redoing this every update for alle clouds?
In my case this did not work and from the description of warning it is true that is needed change Memory limit not post_max_size. For me worked this:
Editing the memory limit from
memory_limit = 128MB
memory_limit = 512MB
In my case it was non of the solutions above. For
- Ubuntu 20.04.1 LTS
- Nextcloud 19.0.6
php7.4-fpm as service it was necessary to change file:
/etc/php/7.4/fpm/pool.d/www.conf, and set this variable to have 756M to run php
php_admin_value[memory_limit] = 756M
And then restart service php7.4-fpm
Try downgrading php to 7.3 and recompile.
I had a similar issue and using a lower version of pho did the trick.
Thanks, it was helpful
Now on NC20 with php7.4. All instances are stable and 100% security (https://internet.nl).
I get no errors anymore about overwritten settings in the ini file.
After updates there are now every time occ commands that need to be executed. When no maintenance mode is required, the occ plugin works fine and fast. Otherwise you should use SSH login and that takes more time.
I believe the main issue will be performance - giving Nc 1gb or 2gb makes it a fair bit faster. But most things should work with a memory setting between 256 and 512 mb.
Thank you for the reply. It’s been so far working without problems even with 384 MB memory limit. It’s a single user instance most of the time and I only use it for occasional file transfers between different iOS devices.
I did adjust the size of preview images in config.php though, in the hope that this would reduce the memory footprint as well as speed up things a little.
‘preview_max_x’ => ‘2048’,
‘preview_max_y’ => ‘2048’,
‘jpeg_quality’ => ‘60’,
Not sure if that accomplishes anything, but it hasn’t caused any problems either.
Hello there! Newby here.
I am trying to locate the php, ini file to update the memory limit but I can’t find the folder! I am not sure if the folder is hidden?
I am using Hestia CP admin panel. Any help would be appreciated!!
I’m running Nextcloud 20.0.8 on Ubuntu 20.04 LTS and I’ve tried every suggestion in this thread I still get the warning in Nextcloud. * The PHP memory limit is below the recommended value of 512MB.
Nextcloud Settings/System PHP reports:
Memory Limit: 128 MB
Max Execution Time: 3600
Upload max size: 2 MB
When I run php -i | grep “memory_limit” I get
memory_limit => 1024M => 1024M
I’ve edited every php.ini file on the box to increase memory to 1024M.
Nevermind… Typo in the php.ini line 2
][PHP] should have been [PHP]
Thanks! I made this and now works!