httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Cicimov <icici...@gmail.com>
Subject Re: [users@httpd] CLOSE_WAIT problem
Date Thu, 24 May 2012 22:32:55 GMT
You can reduce the time on OS level if you want by tuning the tcp stack.
 On May 25, 2012 3:00 AM, "Bongjae Chang" <bongjae.chang@gmail.com> wrote:

> Hi Eric,
> Thank you for quick reply.
>
> You mean if Apache picks up the closed conn and tries to do some I/O
> operations like writing, Apache will failover the conn(with closing the
> conn and creating/reusing new conn). So CLOSE_WAIT may be normal in this
> case, right?
>
> IMHO, as soon as connections are closed from backend, if Apache can detect
> closed connections of backend and close them explicitly, CLOSE_WAITs can
> disappear as soon as possible before Apache tries to reuse them.
>
> Honestly, I didn't know the CLOSE_WAIT conn would be able to be reused
> because new connections always established in my test(I shut down the old
> backend and rebooted the new backend, then both ESTABLISHED and CLOSE_WAIT
> existed).
>
> And I read the default max number which will be allowed to backend is
> ThreadsPerChild directive and users can set the max or ThreadsPerChild to
> be a big number. Then, I think many CLOSE_WAITs can be piled up. It's a
> waste of FDs.
>
> Actually, I was afraid of the following situation.
>
> 1. Apache has many backend connections(i.g 8080 backend port)
> 2. Backend server should be replaced for maintenace
> 3. So Apache connects new backend server(i.g 9090 backend
> port) dynamically without reboot and old backend server will be shut down
> 4. Then all old backend connections(i.g 8080 backend port) will become to
> be CLOSE_WAIT state for long time.
>
> At this case, I would like to know Apache can also clean up 8080 ports of
> CLOSE_WAIT state.
>
> Thanks in advance!
>
> Regards,
> Bongjae Chang
>
>
> On Thu, May 24, 2012 at 7:25 PM, Eric Covener <covener@gmail.com> wrote:
>
>> Backend connections sit in close_wait until Apache tries to reuse
>> them. What problem does it cause?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>

Mime
View raw message