• 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!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • 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.

Problems with new Plesk-build PHP 5.6 on 12.0.18

gbotica

Regular Pleskian
Hi,
I'm still having some pretty serious issues with sites that I'm testing with the new Plesk custom versions of PHP (I'm just using 5.6).

Any site that I enable 5.6 on starts getting the "Premature end of script headers" errors in the error_log, and I also get occasional Server 500 errors, mostly when using the WordPress Admin (as opposed to on the front-end of the site)

If I switch back to PHP 5.4 the problems stop.

I've been searching high and low, and have tried all sorts of things, but I'm getting nowhere, can anyone help?

Firstly, I'm using PHP memory limit of 128MB -- is that too low for PHP 5.6? Could this be the problem?

Other changes I've made to try and resolve this:

In /etc/httpd/conf.d/fcgid.conf
Increased fcgidIOTimeout to 300 -- hasn't helped.

In /etc/nginx/nginx.conf
Increased keepalive_timeout to 300 -- hasn't helped.

I also created a file /etc/nginx/conf.d/timeout.conf with the following:

proxy_read_timeout 300;
proxy_connect_timeout 300;
fastcgi_read_timeout 300;

None of this has helped either.

Something I've found that does sound similar to what I am experiencing is on the Apache docs page for fcgi: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#examples

In particular, the section "Special PHP considerations"

By default, PHP FastCGI processes exit after handling 500 requests, and they may exit after this module has already connected to the application and sent the next request. When that occurs, an error will be logged and 500 Internal Server Error will be returned to the client. This PHP behavior can be disabled by setting PHP_FCGI_MAX_REQUESTS to 0, but that can be a problem if the PHP application leaks resources. Alternatively, PHP_FCGI_MAX_REQUESTS can be set to a much higher value than the default to reduce the frequency of this problem. FcgidMaxRequestsPerProcess can be set to a value less than or equal to PHP_FCGI_MAX_REQUESTS to resolve the problem.

PHP child process management (PHP_FCGI_CHILDREN) should always be disabled with mod_fcgid, which will only route one request at a time to application processes it has spawned; thus, any child processes created by PHP will not be used effectively. (Additionally, the PHP child processes may not be terminated properly.) By default, and with the environment variable setting PHP_FCGI_CHILDREN=0, PHP child process management is disabled.

The popular APC opcode cache for PHP cannot share a cache between PHP FastCGI processes unless PHP manages the child processes. Thus, the effectiveness of the cache is limited with mod_fcgid; concurrent PHP requests will use different opcode caches.
I cannot find the setting "PHP_FCGI_MAX_REQUESTS" -- where do I adjust this?

In case it helps anyone else experiencing these issues, here's a few links I've come across and have been referring to:
Any help greatly appreciated.

Thanks.
 
Back
Top