On Wed, May 23, 2012 at 1:35 AM, Bongjae Chang <bongjae.ch...@gmail.com> wrote:
> Hi all,
>
> When I tested mod_proxy + mod_proxy_balancer + (mod_proxy_ajp or
> mod_proxy_http) with worker mpm, I always met CLOSE_WAIT state in apache
> proxy side.
>
> I tested the following scenario.
>
> - Sending a request at the browser -> apache,  mod proxy -> ajp or http java
> server(1)
> - Normally, browser received the response correctly and the connection state
> was ESTABLISHED.
> - And java server closed the ajp or http connection with timeout(Or
> terminate java server forcibly).
> - Then apache proxy machine always had the CLOSE_WAIT state about the
> connection.
>
> It seemed that the apache proxy modules did not try to close the invalid
> socket which had been already closed at the peer side(the backend java
> server side).
>
> Perhaps is it already the known issue?

I believe this is normal. Apache keeps a pool of connections to the
backend to re-use. There isn't an active thread going through all of
the connections looking to see if they have been closed by the peer.
The proxy module will check the state of a connection after grabbing
it from a resource pool before it re-uses it so the connection in
close_wait will eventually get closed and re-opened. Worse case,  the
number of close_wait connections would be capped at an upper limit
based on your configs and your upstream server.

 Sridhar




>
> Please give me some advice if I am misunderstanding something.
>
> Thanks!
>
> --
> apache version: 2.4.2
> backend java server: grizzly http/ajp, playframework(maybe it uses netty)
> os: Apache(Linux 2.6.18 x86_64), BackendServer(MacOs)
> --
>
> Regards,
> Bongjae Chang

Reply via email to