users@glassfish.java.net

Re: Loadbalancer problems with Apache

From: <glassfish_at_javadesktop.org>
Date: Wed, 10 Oct 2007 06:28:44 PDT

Hi - I've done some tracing with ethereal and it's a little bit clearer.

Conn#1 opened - Web server with mod_loadbalancer initiates connection with app server

30 seconds passes - this is the value defined in HTTP Service -> Keep Alive -> Time Out (I tried varying it).

Conn#1 closed - App server sends FIN,ACK to web server. Web server sends FIN,ACK back and connection is closed cleanly. It's marked TIME_WAIT in netstat on the web server.

Conn#2 opened - Web server initiates a new connection to app server.

5 seconds passes with no traffic

Web server sends a FIN,ACK to the app server for conn#2

Conn#3 opened - Web server initiates a new connection with app server (before receiving FIN,ACK from app server from previous conn#2).

Conn#2 closed - FIN,ACK received from app server - this terminates the connection and it goes to TIME_WAIT on the web server.

5 seconds passes

Web server sends FIN,ACK to app server for conn#3

Web server initiates conn#4 without waiting for FIN,ACK from conn#3

App server sends back FIN,ACK for conn#3 - it closes and goes to TIME_WAIT

5 seconds passes ...

and on an on it goes.

So the first connection is timing out as I'd expect. Then onwards the mod_loadbalancer initiates new connections every 5 seconds - forever. I don't know where this value of 5 seconds is coming from or why it's doing it.
[Message sent by forum member 'ocoro02' (ocoro02)]

http://forums.java.net/jive/thread.jspa?messageID=239311