----- Original Message ----- > From: Hassan Schroeder <[email protected]> > To: Tomcat Users List <[email protected]> > 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 <[email protected]> > 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 http://bugs.mysql.com/bug.php?id=5020 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 5.5.x. 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 thejarbar.org" - I think that was the thread. . . . just my two cents. /mde/ --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
