I own and maintain a game called www.settlementfight.com that has random 500 Internal Server Errors that I can’t stop from happening.
-
The error in the error log is always “premature end of script errors” in whatever page the error was generated on. For example:
[Mon Aug 16 10:55:56 2010] [error] [client ###.###.###.###] Premature end of script headers: army.php, referer: http://www.settlementfight.com/barracks.php -
The error occurs infrequently on every page with PHP, seemingly at random.
-
By every page, I mean every page. Even my Wordpress at Greatplay.net, which previously went for two years without an outage, now experiences intermittent errors. (All my sites are on the same shared server.)
-
Four different programs – phpBB, MediaWiki, Wordpress, and the Dreamhost default phpMyAdmin – that I have not programmed; all experience this error. So I doubt it is a coding problem, but it could be a database problem.
-
Everything I have is all on the same MySQL database. Different sites of mine connect through different hostnames.
-
The error started on July 31, 2010 – the day before I launched my game, so I doubt it is a problem caused by the increased traffic. I first saw it in the Atlanta, Georgia airport. It has occurred constantly since.
-
The most recent thing I did before the error was installing the phpBB forums, but it ran smoothly a few days after that before error’ing.
-
There does not appear to be a connection between traffic and the error.
-
If I put a script in an infinite loop, the error will occur 100% of the time. This seems to indicate a timeout problem.
-
It is not a permissions thing, all my scripts are set to “755”. I have double checked this.
-
I am running PHP 5 as CGI.
What should I do?