tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hassan Schroeder" <hassan.schroe...@gmail.com>
Subject Re: Connections timing out even with validation query??
Date Tue, 15 Jul 2008 14:23:15 GMT
On Tue, Jul 15, 2008 at 4:04 AM, Ken Bowen <kbowen@als.com> wrote:

> The problem: With MySQL connect_timeout = 5, I'm getting timeout exceptions
> (below)  even though I have a
> validation query set; Here's my app's META-INF/context-xml:
>
> <Context path="" debug="5" reloadable="true" crossContext="true">
>  <Resource name="jdbc/sb_data" auth="Container" type="javax.sql.DataSource"
>            maxActive="100" maxIdle="30" maxWait="10000"
>            username="xxxxxx" password="xxxxxx"
>            driverClassName="com.mysql.jdbc.Driver"
>            url="jdbc:mysql://localhost:3306/sb_data"
>            validationQuery="select 1"/>

<http://commons.apache.org/dbcp/configuration.html>

You might try setting testWhileIdle to true (with a reasonable value
for  timeBetweenEvictionRunsMillis) and removeAbandoned to true.

Just to see if that changes/eliminates the symptom...

FWIW,
-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message