Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am a PHP developer and I just spent a good amount of time trying to track down a very strange problem the users of our web application were reporting. It turns out due to a slow API call over the internet (using cURL via PHP) Apache was timing out. I checked httpd.conf and the TimeOut directive was set to 12. I bumped it up to 120 for testing purposes and the problem went away!

When the time out would happen the user's browser would display an error similar to "The server dropped the connection." The error message changed depending on what browser was used and cURL would just say that the response from the server was empty. This behavior seems to make sense but I am bothered that Apache didn't log these timeouts or report any errors. Instead it just shutdown leaving us puzzled as to what was happening until we guessed it was a timeout.

Is there an option to log timeouts or some way we can monitor for this?

share|improve this question

It was probably returning a 504 status code, which the browser interpreted as the above error message. Check your logs for that response code.

share|improve this answer

I'd also verify CURLOPT_TIMEOUT is high enough to allow for what you're trying to do.

share|improve this answer
I can verify this timeout was set high enough. – macinjosh Sep 24 '10 at 14:44

check out this little script if you want to monitor your apache. feel free to add some usefull calls like pa -A when it writes the log so you are able to see the situation more clear. web team

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.