Tomcat database connection pools failing on start-up
Wessel, Keith
kwessel at illinois.edu
Thu Feb 19 12:23:20 EST 2015
Well, Duh. Yes, Scott, that does the trick. The resource gets created even if the3 database server is down when I set initialSie to 0 instead of the default of 10. I somehow assumed that like minActive, initialSize could fall below its defined value if validation queries failed. The docs don't say that, though, and that's obviously a bad assumption.
I wasn't able to test the database server coming back on-line later. But I can only assume that the database connection pool continues to try to connect until it achieves at least minActive connections.
Thanks, Scott. Paul, looks like there's no need to check for this in the code since a corrected DB pool definition with initialSize=0 makes Hibernate happy.
Keith
-----Original Message-----
From: users-bounces at shibboleth.net [mailto:users-bounces at shibboleth.net] On Behalf Of Cantor, Scott
Sent: Wednesday, February 18, 2015 12:13 PM
To: Shib Users
Subject: Re: Tomcat database connection pools failing on start-up
On 2/18/15, 6:07 PM, "Wessel, Keith" <kwessel at illinois.edu> wrote:
>Actually, Scott, if I understand Paul's note correctly, catching the
>exception would help. The IDP wouldn't run and fail. It would just run
>without saving sessions to the database. Unclustered IDPs are better than
>IDPs that present a blank screen after login.
Well, sort of, except you may not know it's happening. At least failure is
easily monitored for.
>And if anyone knows how to tell Tomcat dbcp to keep trying instead of
>failing if the database server's unavailable on start-up, I'd love to
>know.
dbcp isn't Tomcat's code. As a start, I'd see if it can take an
initialSize property of 0 (see BasicDataSource javadoc).
-- Scott
>
--
To unsubscribe from this list send an email to users-unsubscribe at shibboleth.net
More information about the users
mailing list