Yes, I agree - I thought that too, but didn't really
know what I was suppose to be seeing.  I have Tomcat
configured to open 500 (because I was mucking around
trying to make it work, not because I think that's the
right setting) connections on startup and maintain a
minimum of 100 idle at any time.  But when I start
Tomcat I only see a single ESTABLISHED connection to
the db.  Then I start jmeter and this list explodes.

I thought I might be bypassing the connection pool
too, but didn't know how to check that either.  We use
the Spring Framework and it has a method for calling
the JNDI pool manager.  So you just configure Spring
to obtain new connections from Tomcat and it does the
actual access to the db when an sql is used.  The apps
never actually close any connections because Spring is
suppose to do that for you too.  There just doesn't
seem to be a way to check that everything is being
done correctly (that I can tell).  I can tell you this
though - when I changed the Spring configuration
initially, I forgot to save my changes to the Tomcat
config.  Immediately all database connections from the
apps began to fail because the pool manager wasn't
turned on.  Then I configured Tomcat and checked in my
changes - it began working again.  So I can tell that
Spring is relying on Tomcat's ability to connect to
the db, but I can't tell that it's using it correctly.

It seems to me that Spring is using JNDI to obtain a
connection, doing a read and then leaving the line for
dead.  The first 500 get used up and then either
Tomcat or the apps themselves begin firing off more.  

Here is a question I probably should have asked first:
 When I configure Tomcat to pool connections (let's
say to start up with an initial 50), what should I see
when I run netstat directly after starting Tomcat and
before I make any calls to the web app?  Should I see
50 connections (I don't)?

-marc




--- "Caldarale, Charles R"
<[EMAIL PROTECTED]> wrote:

> > From: "Marc Richards" <[EMAIL PROTECTED]>
> > Subject: Performance degradation under load
> >
> > Tomcat is handling connection pooling to our
> iSeries
> > database server (db2, jdbc), but I'm not sure it's
> > working correctly because when I do netstat I see
> > several thousand db connections sitting at
> TIME_WAIT
> > (presumably abandoned and waiting to be cleaned up
> by
> > the pool manager).
> 
> This really sounds like you're not using connection
> pooling, but instead
> are opening a new connection for each request.  How
> many do you have
> configured in the pool?  If it's less than the
> number you see with
> netstat, that would be another indication that your
> app is getting its
> own connections rather than ones from the pool.
> 
> Is your app closing the connections (and statements
> and result sets)
> properly?  This usualy requires putting the close
> statements in finally
> blocks, just to make sure that exceptions don't
> cause them to be
> skipped.
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR
> OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended
> recipient. If you
> received this in error, please contact the sender
> and delete the e-mail
> and its attachments from all computers.
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to