Menu

#134 Tomcat / MySQL "Zombie" Connection

v1.0 (example)
closed
None
1
2015-09-29
2015-09-25
No

Issue Environment:
Tomcat 7.0.54
c3p0 0-9.5.1.jar / mchange-commons-java-0.2.10.jar
MySQL Enterprise 5.6.13
Java: JRE 8.0_31

The Connection Pool settings established in my application's META-INF/context.xml do not seem to be affecting the first established pool connection (per MySQL process id) that is created/connected when Tomcat is started up or the Java application is cycled. None of the idle time / idle testing / max age settings seem to effect this one connection and it only gets disconnected by MySQL once the wait_timeout setting is reached.

All other connections are behaving as expected.

My context.xml:

<Context path="/myapp" reloadable="true" privileged="true">
<Resource name="jndi/mysql" auth="Container" driverClass="com.mysql.jdbc.Driver" factory="org.apache.naming.factory.BeanFactory" type="com.mchange.v2.c3p0.ComboPooledDataSource" user="xxxxxxx" password="xxxxxx" jdbcUrl="jdbc:mysql://localhost:3306/myschema?noAccessToProcedureBodies=true" initialPoolSize="10" maxPoolSize="20" minPoolSize="10" acquireIncrement="10" maxIdleTime="30" maxIdleTimeExcessConnections="15" idleConnectionTestPeriod="30" preferredTestQuery="SELECT 1"/>
</Context>

Discussion

  • Steve Waldman

    Steve Waldman - 2015-09-29
    • status: open --> closed
     
  • Steve Waldman

    Steve Waldman - 2015-09-29

    After being advised (in e-mail correspondence) to try unreturnedConnectionTimeout and debugUnreturnedConnectionStackTraces, submitter writes "I have found my issue thanks to the debug setting. You can get rid of my bug report off the sourceforge site."

     

Log in to post a comment.