users@glassfish.java.net

Re: help me understand keep-alive config.

From: Dick Davies <rasputnik_at_hellooperator.net>
Date: Sun, 31 Aug 2008 23:48:57 +0100

Salut Jeanfrancois

On Fri, Aug 29, 2008 at 4:02 PM, Jeanfrancois Arcand
<Jeanfrancois.Arcand_at_sun.com> wrote:
> Salut,
>
> Dick Davies wrote:

>>> gfish$ asadmin get -m instance1.http-service.keep-alive.*count

>> has no relation to actual OS http connections - if I take the instance
>> out
>> of load balance, netstat shows no connections to the instance from the
>> netscaler, but that number remains high.
>
> Hum, looks like a bug. Can you describe a simple test case I can look at?
> That value must match the OS http connections :-)

well, in that case things are pretty screwy :) Here's a repeatable testcase.

The original behaviour was on a Solaris 10 glassfish cluster, jdk 1.6.

This is all reproducible on a mac, the gf2 version that was bundled
with netbeans 6.1 (without the
asquickstart voodoo, btw), jdk 1.5.

I get the feeling countconnections-count is more like the high
watermark than the current value.
--------------------------

asadmin start-domain

asadmin set server.monitoring-service.module-monitoring-levels.http-service=LOW

hypnotoad:~ $ asadmin get -m *keep*.*count
server.http-service.keep-alive.countconnections-count = 0
server.http-service.keep-alive.countflushes-count = 0
server.http-service.keep-alive.counthits-count = 0
server.http-service.keep-alive.countrefusals-count = 0
server.http-service.keep-alive.counttimeouts-count = 0
server.http-service.keep-alive.maxconnections-count = 250
server.http-service.keep-alive.secondstimeouts-count = 30
hypnotoad:~ $ asadmin get -m *keep*.*count
server.http-service.keep-alive.countconnections-count = 1
server.http-service.keep-alive.countflushes-count = 0
server.http-service.keep-alive.counthits-count = 1
server.http-service.keep-alive.countrefusals-count = 0
server.http-service.keep-alive.counttimeouts-count = 0
server.http-service.keep-alive.maxconnections-count = 250
server.http-service.keep-alive.secondstimeouts-count = 30

XXX countconnections-count increments each time you run the get
command - does asadmin use keepalives?

Start some keepalive connections

I run ' ab -n 200 -c 100 -k http://localhost:8080/ ' a few times
until countconnections-count
creeps over 250.


hypnotoad:~ $ asadmin get -m *keep*.*count
server.http-service.keep-alive.countconnections-count = 303
server.http-service.keep-alive.countflushes-count = 0
server.http-service.keep-alive.counthits-count = 1846
server.http-service.keep-alive.countrefusals-count = 0
server.http-service.keep-alive.counttimeouts-count = 0
server.http-service.keep-alive.maxconnections-count = 250
server.http-service.keep-alive.secondstimeouts-count = 30


XXX it's crept over the maximum.

hypnotoad:~ $ sleep 90; asadmin get -m *keep*.*count
server.http-service.keep-alive.countconnections-count = 304
server.http-service.keep-alive.countflushes-count = 0
server.http-service.keep-alive.counthits-count = 1847
server.http-service.keep-alive.countrefusals-count = 0
server.http-service.keep-alive.counttimeouts-count = 0
server.http-service.keep-alive.maxconnections-count = 250
server.http-service.keep-alive.secondstimeouts-count = 30


XXX it's not going down, well after the timeout.

hypnotoad:~ $ netstat -an|grep 8080
tcp46 0 0 *.8080 *.* LISTEN

XXX and it seems like the connections-count has nothing to do with
actual TCP connections.

---
Shall i file a bug?
PS. I also notice you cleverly avoided explaining that
"-Dcom.sun.enterprise.server.ss.ASQuickStartup=false" flag :)
-- 
Rasputnik :: Jack of All Trades - Master of Nuns
http://number9.hellooperator.net/