• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Nginx + FasCGI PHP Fatal error: Allowed memory size of X bytes exhausted

PedroV.

Basic Pleskian
Hello, I have a wordpress website using Nginx with PHP-FPM but sometimes when I try to post a article give me a blank page. When I go to nginx error log I saw this:

2014/05/02 17:41:35 [error] 3184#0: *25722 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 196608 bytes)$server: domain.com, request: "GET /wp-admin/post.php?post=135710&action=edit&message=6 HTTP/1.1", upstream: "fastcgi://unix:/var/www/vhosts/system/domain.com/php-fpm.sock:$

In PHP settings I have on memory limit: 24384M.

But I think is need to raise the memory limit of FastCGI right? How can I increase?

My server have 32GB of ram.

Thank you
Regards,
Pedro
 
Last edited:
You probably edited the PHP memory limit in the wrong place. Please create a new PHP file on this website containing:

<? phpinfo(); ?>

Then open the file in your browser and check for the PHP.ini file location. Then edit that file.
Or, modify PHP.ini settings for this subscription in Plesk.

PS: Your error indicates WP is trying to allocate more then 268 MB of RAM. That is quite a lot just for posting a new article. It could be you have some out of control WP plugins.
 
Thanks for the reply Tozz,

I see in php file and shows me the memory_limit is 24384M.

Yes appears to be a plugin that are using much resources but the error with memory of 268 MB doesn't make sense.
 
24G is alot of memory for 1 PHP script. What if you change it to a more sensible amount? Such as 2GB? Or maybe you can set it to 0, to set an unlimited amount.

Also see: http://stackoverflow.com/questions/9276212/php-settings-memory-limits-1024m-does-not-work

As that thread suggest you might also verify that suhosin (if installed) is not causing grieve. You could try to uninstall suhosin, as it can cause troubles hard to diagnose. You can then reinstall it later on when necessary.
 
Back
Top