DB-backed storage service: testing database pool status?
Wessel, Keith
kwessel at illinois.edu
Thu Aug 28 15:51:04 EDT 2014
Okay, so maybe things weren't quite as bad as I thought.
Tomcat couldn't find said factory: org.apache.tomcat.jdbc.pool.DataSourceFactory
So I found this:
https://bugzilla.redhat.com/show_bug.cgi?id=669969
It may not be totally relevant since it's a Redhat bug report and we're running a non-OS-packaged installation of Tomcat, but it says:
Nevertheless,Tomcat internals assume
(hardcoded as a last resort) org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory as
a default.
So, it sounds like Tomcat 6, if I read that right, uses DBCP by default. Of course, since I had no query validation or pool object eviction enabled, that does me little good.
Keith
-----Original Message-----
From: Wessel, Keith
Sent: Thursday, August 28, 2014 12:16 PM
To: 'Shib Users'
Subject: RE: DB-backed storage service: testing database pool status?
Ah-ha! Well, now, no pooling could be a problem. A single hung connection with no validate on borrow could gum up the whole works. I see from here:
http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html
that I'm missing:
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
Then, of course, add all of the appropriate parameters for validating connections. This is from the Tomcat 7 docs. Does the same apply under Tomcat 6? Looks like it:
http://people.apache.org/~fhanik/tomcat/jdbc-pool.html
A nice example with some good sample settings is on this page, too, for a starting point.
Stop me if I'm going down the wrong road. Otherwise, I think this would be the problem. Looks like a single database connection could certainly gum up the works.
Thanks,
Keith
-----Original Message-----
From: users-bounces at shibboleth.net [mailto:users-bounces at shibboleth.net] On Behalf Of Cantor, Scott
Sent: Thursday, August 28, 2014 11:04 AM
To: Shib Users
Subject: Re: DB-backed storage service: testing database pool status?
On 8/28/14, 11:51 AM, "Wessel, Keith" <kwessel at illinois.edu> wrote:
>I was planning on adding some validation parameters. Right now, my setup
>is truly minimal.
You definitely need some stuff to make pooling work. With dbcp, I've
generally used the validate on get model, I think, and a validation query.
I'll double check my settings. But I only use this now with MySQL local to
the box, so it's not much of a risky scenario.
>As for what type of pooling, I'm not sure exactly what you're asking
>there. Let me try to answer that: it's a container resource that looks
>like:
><Resource name="jdbc/idp"
>Auth="Container"
>Type="javax.sql.DataSource"
>. />
>In addition, it has my Oracle driver, connection params, and a maxWait of
>10,000 ms.
That means you're not pooling, or you're using something from Oracle
inside the driver, and it's probably broken. You want to wrap that driver
in a dbcp data source object. I'll post what I use when I have a chance.
>I'm planning to add a validation query. I suspect that'll do the trick,
>but it'd certainly be good to monitor it somehow. Maybe Scott's right and
>we should just have the SLBs and service monitoring perform a full login.
I would think you'd want that anyway, for monitoring at least. webisoget
is your friend. I don't have the SLBs doing much other than an HTTP GET at
this point though.
-- Scott
--
To unsubscribe from this list send an email to users-unsubscribe at shibboleth.net
More information about the users
mailing list