How to solve the "The PHP memory limit is below the recommended value of 512MB" message?

I am getting the dreaded “The PHP memory limit is below the recommended value of 512MB” error. I have looked around and everyone just says modify my php.ini file. I tried to update everywhere i could:

root@linode (8.1 ): pwd
/etc/php/8.1
root@linode (8.1 ): grep -r memory_limit .
./cli/php.ini:memory_limit = 1G
./fpm/php.ini:memory_limit = 1G
./fpm/pool.d/www.conf:php_admin_value[memory_limit] = 1G

I restarted apache2 after changing these values. None of it changed the error. Apache also reports 128M used by php and I don’t know why.
I’m not experienced enough to know what to try next. Can anyone help? Thanks!

Nextcloud version (eg, 20.0.5): 24.0.2
Operating system and version (eg, Ubuntu 20.04): Debian 11.4 bullseye
Apache or nginx version (eg, Apache 2.4.25): 2.4.54
PHP version (eg, 7.4): 8.1.7

The issue you are facing:
In my control panel I keep seeing “The PHP memory limit is below the recommended value of 512MB”

Is this the first time you’ve seen this error? (Y/N): No

Aha I guess I needed to reboot my machine. After changing the values and restarting apache2, I thought that would be enough, but after a reboot it took. I’m not sure why this might be… but problem solved.

1 Like

You also need to restart the php-fpm service after you made any changes to the ./fpm/php.ini.

systemctl restart php8.1-fpm

But a reboot does the trick as well, of course. :slight_smile:

1 Like