ostark/craft-async-queue

Hitting unusual memory limit

Closed this issue · 8 comments

The 'Deleting Stale Template Caches' job is failing and complaining about hitting a memory limit

The command "/opt/plesk/php/7.2/bin/php craft queue/exec "79272" "300" "1" "" --color=" failed. Exit Code: 255(Unknown error) Working directory: /var/www/vhosts/mydomain.com/httpdocs 

Output: 
================ Error Output: ================ 
PHP Fatal Error 'yii\base\ErrorException' with message 'Allowed memory size of 134217728 bytes exhausted (tried to allocate 12288 bytes)' 

By my calculations that's a 128M limit, but my php.ini file reads 512MB for memory_limit. I've since tried adding the Craft config 'phpMaxMemoryLimit' => '512M' but that doesn't seem to have made any difference.

I should add I've run the tests for Asyc Queue from Utilities and they run fine so I'm sure the right php binary is being located correctly.

Craft: 3.3.3
Craft-Async-Queue: 2.0.0

Any ideas? Thanks

In case it's relevant, the server is running:

  • CentOS 6.9
  • Plesk 17.8.11
  • PHP 7.2.23 in FastCGI mode

I tested turning off the Async Queue plugin and re-tried the jobs which then successfully ran.

If there are any more details I can provide let me know.
Thanks

I will take care after my vacation. Thanks.

That would be amazing. Do you have any estimation for when this might get look at? Many thanks.

@icreatestuff
Sorry for the late reply. I assume your php-cli environment has a 128M memory limit. Please double check

/opt/plesk/php/7.2/bin/php -i | grep memory_limit

If that's the case, you need to adjust it in your php.ini (maybe the FastCGI / FPM has a different php.ini)

/opt/plesk/php/7.2/bin/php -i | grep ini

Solved?

hmm, "domain level"? not sure what it means in Plesk.
The command line is usually not aware of a "domain". < Async Queue runs on the command line.