Too many open connections from Tomcat to MySQL?
620837Oct 29 2009 — edited Nov 4 2009<?xml version='1.0' encoding='utf-8'?>
<Context>
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Resource
name="jdbc/RealmDB" auth="Container" type="javax.sql.DataSource"
username="root" password="password" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/monk"
maxActive="-1" maxIdle="5" maxWait="5000"
removeAbandoned="true" removeAbandonedTimeout="60"
testWhileIdle="true" timeBetweenEvictionRunsMillis="180000"/>
<Realm
className="org.apache.catalina.realm.DataSourceRealm"
dataSourceName="jdbc/RealmDB" localDataSource="true"
digest="MD5"
userTable="user" userNameCol="user_name" userCredCol="password"
userRoleTable="tcrole" roleNameCol="role_name" />
</Context>
Is there a way in here to auto close inactive connections after say 10 seconds? Is that the removeAbandonedTimeout or the Eviction section? Would this be better off posted on the tomcat user listing?
Edited by: TheWhiteKnight on Oct 29, 2009 8:00 PM