tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jerry Malcolm <>
Subject Re: connection autoReconnect?
Date Sun, 29 Jan 2012 01:32:32 GMT
Not good news.  I changed every resource statement in server.xml to
something like this:

      <Resource* testOnBorrow="true" validateQuery="SELECT
1"*name="jdbc/xxxxxxx" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000" removeAbandoned="true"
removeAbandonedTimeout="60" logAbandoned="true" username="xxxxxxxx"
password="xxxxxxxx" driverClassName="com.mysql.jdbc.Driver"

Zero change.  I'm still getting the exact same error message telling me the
connection has expired and I should use autoReconnect to fix it.

First question... is the syntax above correct?  (I saw some resource tag
examples that used nested  <parameter> tags and other examples that use
attributes on resource tag like above.  I couldn't find a definitive
specification to use one over the other.  Is the way I have it ok?

Second question.... I like to turn on debug/trace for the connector.  But
the connector/j doc lists a ton of parameters for debug, and I don't have a
clue how to set all of them.  Can someone just give me a canned config I
can add that'll trace what's going on in the connector?

I'm basically at a loss.  If the configuration above is correct, and I'm
still getting expired connections, I don't know what else to do.  If indeed
TC 7 changed from round-robin to LIFO, it might explain why it started
hitting stale connections.  But that still doesn't explain why
testOnBorrow, validateQuery, and autoReconnect=true don't seem to do
anything on stale connections.

Maybe with some logging and tracing, something will become obvious.



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message