Several TIME_WAIT with apache2

Discussion in 'Server Operation' started by xomoxo, Jan 26, 2007.

  1. xomoxo

    xomoxo New Member

    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.
     
  2. falko

    falko Super Moderator ISPConfig Developer

  3. xomoxo

    xomoxo New Member

    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.
     
  4. falko

    falko Super Moderator ISPConfig Developer

    These values are a bit high, I'd say.
    Have you tried something like

    Code:
    StartServers 5
    MinSpareServers 5
    MaxSpareServers 15
    ?
     
  5. xomoxo

    xomoxo New Member

    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.
     
  6. falko

    falko Super Moderator ISPConfig Developer

    How many page views or visits do you have each day? Your server seems to be very busy...
     
  7. xomoxo

    xomoxo New Member

    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.
     
  8. falko

    falko Super Moderator ISPConfig Developer

    You can try this:
    Code:
    Timeout 300
    KeepAlive On
    MaxKeepAliveRequests 100000
    KeepAliveTimeout 4
    MaxRequestsPerChild  100000
     

Share This Page