NoMad NoMad - 2 months ago 9x
PHP Question

mod_fcgid read data timeout - Premature end of script headers

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


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 ), 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.