Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

My web server has a lot of apache tcp CLOSE_WAIT's stuck at poll(found through a backtrace in gdb), How do I debug what in php is causing my web server to not properly close connections?

share|improve this question
This just means your PHP code is opening connections but not closing them. It's not an Apache problem. Try to track down which PHP script it is. – David Schwartz Oct 26 '12 at 23:41

Install/enable mod_status, configure it to allow access from your URL and access the server with <server-ip>/server-status

You should see a list of all current active client connections including vhost and path.

IIRC had this problem when a badly configured crawler hit a website that used a not properly implemented php script that handled images. It tried to access all those images as if it were links causing huge load and many open connections.

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.