Monday, October 14, 2024

Apache + PHP: too many connections in CLOSE-WAIT state.

 This is happening because your PHP scripts are not exiting. They hang up for whatsoever reason (like waiting form some network i/o etc...). The client has requested a closure of the connection but apache will not close the connection (or consider it closed) until the script terminates, and therefore Apache will not close the TCP socket by doing the right system calls.

In case you where wondering, max_execution_time does not count the time taken by external commands which are executed or other external I/O activity like connection to databases etc...

No comments:

Post a Comment