I\'ve been having random 500 Internal Server
errors on my PHP / MySQL based sites on various shared hosts. I\'m using PHP 5.2.17 through CGI/FastCGI on a shared Lin
for anyone looking for more info:
in my case, there was a code issue. On an incoming http request, a call to an internal URL was being made from within the code thereby creating a deadlock kind of situation.
This resulted in hung PHP processes and brought the server down. we were using file_get_contents('URL') or cURL() in our callback function. We then replaced it with an simple drupal function which provided us the values from DB.
The NewRelic tool helped me identify the function which was taking a lot of time to respond.
Another way to identify this would have been to do a drupal_watchdog on our callback function and verify the logs when the server crashed.
hope this helps.