You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Glenn Nielsen <gl...@voyager.apg.more.net> on 2002/02/06 02:50:55 UTC

Re: Tomcat 4.1-dev and commons-dbcp sql timeout problems

I found a solution for this problem, thought I would update this posting
in case anyone else needs to solve this.

The problem with SQLExceptions due to an SQL timeout was due
to the MySQL JDBC driver.  Adding "?autoReconnect=true" to the
MySQL JDBC connect URL solved the problem.  We were only seeing
the timeout bug after mysqld would drop a connection after 8 hours
of inactivity.

We did some load testing using DBCP and had no problems running up to 1000
connections per minute.  We now have DBCP in production using JNDI named
DataSource's for several applications, including one which uses Castor JDO.
Seems to be working fine.

Regards,

Glenn

Glenn Nielsen wrote:
> 
> I tried using DBCP instead of tyrex for a JNDI named JDBC DataSource
> in Tomcat 4.1-dev for several days.  Castor JDO is used between the
> applicaton and the db.  With Tyrex everything works fine, with DBCP
> we get SQLTimeoutException's periodically.  This is using MySQL
> 3.23 with InnoDB tables and the latest mm.mysql jdbc driver.
> 
> Has anyone else experienced lost connections resulting in SQLTimeoutException's
> when using DBCP?
> 
> Regards,
> 
> Glenn
> 
> ----------------------------------------------------------------------
> Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
> MOREnet System Programming               |  * if iz ina coment.      |
> Missouri Research and Education Network  |  */                       |
> ----------------------------------------------------------------------
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

-- 
----------------------------------------------------------------------
Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>