The current PHP memory limit is below the recommended value of 512MB?

NC14.0.3 + Debian 9 + PHP 7.2:

After every occ command comes:

The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see
The current PHP memory limit is below the recommended value of 512MB.

But i have definitely 513 MB memory_limit.

How can i let the error message disappear?

You are sure about the limit?

php -i | grep memory_limit

It can and it is in general different if you call php from command line or via browser. What is a bit difficult is that the value can be changed at different locations. Therefore, the most reliable test is to put a small script which shows you the limit.

sudo -u www-data php72 -i | grep memory_limit
memory_limit => 128M => 128M

But phpinfo.php is showing me 513 MB

You have two php.ini files in your system:

  • /etc/php/7.2/cli/php.ini (for php CLI)
  • /etc/php/7.2/apache2/php.ini (used by the webserver)

When you do a GET /phpinfo.php you’re calling the webserver, when you run php72 -i | grep memory_limit the other config file is used.

I believe that occ commands use the CLI ini file.

Hi guys, the easiest way to fix the message is the following:

sudo gedit /etc/php/7.2/apache2/php.ini

then look for:

[memory_limit] = 512M

After chaging to 512M restart apache

sudo systemctl restart apache2.service

I’ve done that but I still get the message, even after a full server reboot

Same here. Also modified the entry in fpm/php.ini, message still remains. Maybe it’s related to the -1 entry for cli? (I assume that’s “unlimited”?) Or maybe because it’s “memory_limit” without brackets in PHP7.3’s php.ini?

same problem (v16.0.3.0)
I set
memory_limit = 1000M
sudo -u www-data php7.3 -i | grep memory_limit
memory_limit => 1000M => 1000M
but the error after reboot is still there

Normally, in this output it should also tell you which configuation file is used:

sudo -u www-data php7.3 -i

I’m wondering if php also takes other files in the folder into accound (like .htaccess or user.ini)…

Actually plenty, it seems:

This is the main one:

The others are included from there.