
26th January 2007, 11:08
|
|
Junior Member
|
|
Join Date: Jan 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Several TIME_WAIT with apache2
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.
|

27th January 2007, 14:03
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
Are there any errors in Apache's error log?
Did you have a look at this tutorial? http://www.howtoforge.com/configurin...um_performance
|

29th January 2007, 10:52
|
|
Junior Member
|
|
Join Date: Jan 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

30th January 2007, 11:27
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
Quote:
|
Originally Posted by xomoxo
StartServers 50
MinSpareServers 30
MaxSpareServers 45
|
These values are a bit high, I'd say.
Have you tried something like
Code:
StartServers 5
MinSpareServers 5
MaxSpareServers 15
?
|

30th January 2007, 13:47
|
|
Junior Member
|
|
Join Date: Jan 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

31st January 2007, 20:18
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
How many page views or visits do you have each day? Your server seems to be very busy...
|

2nd February 2007, 12:52
|
|
Junior Member
|
|
Join Date: Jan 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

3rd February 2007, 14:20
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
You can try this:
Code:
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100000
KeepAliveTimeout 4
MaxRequestsPerChild 100000
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 05:50.
|
Recent comments
1 day 3 hours ago
1 day 8 hours ago
1 day 9 hours ago
1 day 10 hours ago
1 day 12 hours ago
1 day 16 hours ago
1 day 17 hours ago
1 day 19 hours ago
2 days 9 hours ago
2 days 10 hours ago