users@glassfish.java.net

Re: connection pool monitoring on a cluster

From: Jagadish Prasath Ramu <Jagadish.Ramu_at_Sun.COM>
Date: Fri, 29 Aug 2008 22:11:15 +0530

Hi Dick,
Responses in-line.
On Fri, 2008-08-29 at 14:26 +0100, Dick Davies wrote:
> Hi Jagadish, thanks for getting back to me.
>
> On Fri, Aug 29, 2008 at 12:11 PM, Jagadish Prasath Ramu
> <Jagadish.Ramu_at_sun.com> wrote:
> >
> >
> > On Thu, 2008-08-28 at 14:41 +0100, Dick Davies wrote:
> >> On Thu, Aug 28, 2008 at 2:11 PM, Dick Davies
> >> <rasputnik_at_hellooperator.net> wrote:
> >>
> >> > So my first question is : can I see these values via the admin webapp?
> >>
> >> To answer my own question : yes, under
> >>
> >> clusters -> <cluster-name> - > instances -> <pick an instance> -> monitor
> >>
> >> would still like to know why the values below don't seem to add up, though.
>
> > Yes, this can be done though showing the added/avg values for a cluster
> > will be a bit tricky, IMO. eg: avg-connection-wait-time
>
> No, that's fine - if the pools are per-instance it's not all that
> useful to aggregate them
> anyway. asadmin, amx or Jruby-jmx is fine for my purposes.
>
> I was talking about the individual pools tallying up (further down).
>
> >> > Also, it looks like each server instance has its own copy of the pool,
> >> > that's right isn't it
> > Yes. each instance maintains its own pool.
>
> >> > If I browse around under those entries I can find stats on the
> >> > pool(s?) themselves, but they don't seem to add up:
> >> >
> >> > gfish$ asadmin get --monitor=true inst*.resources.prod-pool.numconn*-current
> >> >
> >> > inst01.resources.prod-pool.numconnfree-current = 7
> >> > inst01.resources.prod-pool.numconnused-current = 0
> >> > inst02.resources.prod-pool.numconnfree-current = 6
> >> > inst02.resources.prod-pool.numconnused-current = 0
>
> >> > both the pools have an initial size of 8 (the default), so I can't
> >> > figure out where the other connections are?
>
> > Can you check the no. of connections (session) from the db ?
>
> After the weekend yes - the DBA is off to Cornwall for a lie down, but back
> monday I believe.
>
> But whatever's going on back there, I'd expect these figures to add up,
> and they don't seem to.
> Is there somewhere else they might appear (e.g. leaks?)
Probably, you can enable connection-leak-tracing in the connection-pool
to see the code that's leaking the connections.

http://blogs.sun.com/kshitiz/entry/connection_leak_tracing

Thanks,
-Jagadish
>