apache - Too many TIME_WAIT connections -
We use a fairly busy website (1 million page views / day) Apache mod proxy which remains overloaded with connection (> 1,000) in TIME_WAIT position The connections are for Port 3306 (MyScill), but mysql only shows some connections (show process list) and performing well. We have tried to change many things (keeping alive on / off), but nothing is helping other system resources are within the appropriate range.
I searched around, which indicates the change of TCP_time_white_inverver but it seems a bit stern I have worked on a busy website before but it was never a problem.
Any suggestions?
Each time_wait connection is a connection that has been turned off.
You are probably connecting with mysql, repeating a query, then repeating for each query on the disconnecting page. Consider using the connection pooling tool, or at least one global variable that holds on your database connection. If you use the global, you have to close the connection at the end of the page. Hopefully you have some place in common, you can put it, like the footer is included.
As a bonus, you should get a fast page load. MySQL is quick to connect, but there is no need to reconnect.
Comments
Post a Comment