skip to Main Content

The websites on one of my Plesk users can’t be accessed. The server reports a 500 Internal server error, the error_log for that user shows a bunch of

[warn] mod_fcgid: read data timeout in 60 seconds
[error] Premature end of script headers: index.php

The DocumentRoot contains a normal WordPress installation. Other sites running the same WP version, using the same DB server and PHP+Extensions run fine. A <?php phpinfo(); ?> runs fine as well. Calling php index.php from cli returns the webpage, but is a bit too slow for an idle Xeon E5-2620 Server w/ 64GB RAM

Are there any known Problems? How can I debug further?

Some more system info:

  • PHP 5.6.24 (tried 5.4 as well)
  • Plesk 12.5.30

EDIT: The Problem occurs intermittently. Right now, no 500 Error is returned, site loads fine (a bit slow). I increased memory_limit, just to be sure it isn’t a config limitation

2

Answers


  1. Chosen as BEST ANSWER

    The problem was caused by a rogue file_get_contents in some scripts.

    I looked through the error log for the 1st appearance of the error message, and found a file created exactly when the error message first appeared - only 2 years earlier... WordPress Site hacked? Suspicious PHP file

    So I removed the malware ( detailed write-up at https://talk.plesk.com/threads/debugging-premature-end-of-script-headers.338956/ ), rebooted the Server and the error is now gone.

    Technical detail: The error turned up because the Server distributing the malware is offline. file_get_contents("http..." timed out, the local script failed and returned the error message.


  2. You can try to increase FcgidIOTimeout as described here https://kb.plesk.com/en/121251

    Since Plesk 11.5, "FcgidIOTimeout" parameter is set to the same value as max_execution_time php parameter in domain's PHP settings

    Also you can try any of PHP-FPM handler instead of FastCGI, because of mod_fcgid has a lot of internal performance limitations which can’t be avoided.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search