Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
5  
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

1 Answer 1

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

 
discard

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.