Hi to all, This is my first post, and I want to say that this webpage have been so useful to me. I have a problem with Apache2 and several TIME_WAIT connections. The hardware is a Dual Xeon 3,6 Ghz, and 3,5 Gb of RAM. The systems have: Apache 2.2.4 PHP 4.4.4 Mysql 4.1.22 Eaccelerator 0.5 When I start apache, it start to create lots of TIME_WAITs connections, in a few minutes I can reach 800 or 900, and only 20 or 25 ESTABLISHED connections. ServerLimit 240 MaxClients 240 Timeout 120 KeepAlive On MaxKeepAliveRequests 100 StartServers 50 MinSpareServers 30 MaxSpareServers 45 MaxRequestsPerChild 100 KeepAliveTimeout 5 The SO is Debian 3.1 and the kernel is 2.6.8-3-686-smp. Thanks to all.
Are there any errors in Apache's error log? Did you have a look at this tutorial? http://www.howtoforge.com/configuring_apache_for_maximum_performance
Yes, I saw this manual and I think that all the parameters are fine, in the error log there isn't any error. I think that maybe it's a Debian 3.1 problem, because on other server I install the same operative system with the same services, and I have the same problem. In this new system, I get a new kernel from the Backports, and the problem is there too.
These values are a bit high, I'd say. Have you tried something like Code: StartServers 5 MinSpareServers 5 MaxSpareServers 15 ?
Actually I have: Code: StartServers 40 MinSpareServers 10 MaxSpareServers 30 Because If it download the values start to appear messages in error_log like: [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 8 idle, and 31 total children (I get it sometimes with this configuration too). Thanks for all.
We have more servers, and all is balanced between all of them, but we don't know why only two servers with Debian 3.1, have all this TIME_WAIT connections.
You can try this: Code: Timeout 300 KeepAlive On MaxKeepAliveRequests 100000 KeepAliveTimeout 4 MaxRequestsPerChild 100000