tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Eggers <>
Subject Re: Login fails, then works subsequently (Tomcat 7)
Date Thu, 22 Dec 2011 19:35:19 GMT
----- Original Message -----

> From: Hassan Schroeder <>
> To: Tomcat Users List <>
> Cc: 
> Sent: Wednesday, December 21, 2011 2:40 PM
> Subject: Re: Login fails, then works subsequently (Tomcat 7)
> On Wed, Dec 21, 2011 at 2:23 PM, Jerry Malcolm <> 
> wrote:
>>  Here is the line from <GlobalNamingResources> in server.xml:
> No "testWhileIdle" / "validationQuery" settings?
> 10 to 1 you've got stale connections in your pool; first try fails, second
> one gets a fresh connection and away you go.
> Just a WAG -- no idea why you'd only see this after upgrading.

I seem to recall an issue with using autoReconnect with pooled connections. According to the
MySQL bug database, it's recommended to not use autoReconnect (see for example at
the end).

I recommend the validationQuery approach and testWhileIdle Hassan mentioned above.

I have no idea as well why this would suddenly pop up in Tomcat 7.0.x as opposed to Tomcat

Using pools with at least a validationQuery for authentication addresses a host of other issues
concerning authentication / authorization that arises due to the frequency / infrequency of
requests when compared to normal application database requests.

There was a long discussion concerning those issues on the mailing list some time back. Look
for "problems at" - I think that was the thread.

. . . just my two cents.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message