• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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