You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Dennis Muhlestein <de...@zserve.com> on 2002/06/03 23:20:48 UTC

jdbcpool

I'm using the commons-pool, commons-dbcp to connect to mysql from tomcat
4.  Everything works fine when I develop but if I leave the site
unattened for a period of time, mysql times out the connections in the
pool.

I'd really like to set the maxIdle parameter to 0 so that if there are
idle connections they leave the pool.  Basically setting the min pool
size to 0 is what I want to do.  I haven't seen a minPoolSize parameter
though.  

The documentation says if I set maxIdle to 0 that means unlimited.  That
won't work I guess.  Is there a solution to this problem?

Thanks
Dennis




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


Re: jdbcpool

Posted by Dennis Muhlestein <de...@zserve.com>.
Thanks for the reply, I had found the autoReconnect parameter and that
seeme to solve my problem.  I heard there is an over head associated
with that though but I don't believe it to be a problem for me at this
time.

On Tue, 2002-06-04 at 22:22, Glenn Nielsen wrote:
> If your are using the mm.mysql JDBC driver add the autoReconnect=true 
> arg to your mysql connect url.  With this the mysql jdbc driver will
> reconnect to the db if it looses the connection.
> 
> Then you can set your minIdle to 1, and your mysql db can timeout
> its connection after the default 8 hours.  But that one idle connection
> in dbcp can reconnect if needed.
> 
> Regards,
> 
> Glenn
> 
> Dennis Muhlestein wrote:
> > 
> > I'm using the commons-pool, commons-dbcp to connect to mysql from tomcat
> > 4.  Everything works fine when I develop but if I leave the site
> > unattened for a period of time, mysql times out the connections in the
> > pool.
> > 
> > I'd really like to set the maxIdle parameter to 0 so that if there are
> > idle connections they leave the pool.  Basically setting the min pool
> > size to 0 is what I want to do.  I haven't seen a minPoolSize parameter
> > though.
> > 
> > The documentation says if I set maxIdle to 0 that means unlimited.  That
> > won't work I guess.  Is there a solution to this problem?
> > 
> > Thanks
> > Dennis
> > 
> > --
> > 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>
> 



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


Re: jdbcpool

Posted by Glenn Nielsen <gl...@voyager.apg.more.net>.
If your are using the mm.mysql JDBC driver add the autoReconnect=true 
arg to your mysql connect url.  With this the mysql jdbc driver will
reconnect to the db if it looses the connection.

Then you can set your minIdle to 1, and your mysql db can timeout
its connection after the default 8 hours.  But that one idle connection
in dbcp can reconnect if needed.

Regards,

Glenn

Dennis Muhlestein wrote:
> 
> I'm using the commons-pool, commons-dbcp to connect to mysql from tomcat
> 4.  Everything works fine when I develop but if I leave the site
> unattened for a period of time, mysql times out the connections in the
> pool.
> 
> I'd really like to set the maxIdle parameter to 0 so that if there are
> idle connections they leave the pool.  Basically setting the min pool
> size to 0 is what I want to do.  I haven't seen a minPoolSize parameter
> though.
> 
> The documentation says if I set maxIdle to 0 that means unlimited.  That
> won't work I guess.  Is there a solution to this problem?
> 
> Thanks
> Dennis
> 
> --
> 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>


Re: jdbcpool

Posted by Juozas Baliuka <ba...@centras.lt>.
Hi,
You can configure connection timeout on mySQL, it is better for performance.


> I'm using the commons-pool, commons-dbcp to connect to mysql from tomcat
> 4.  Everything works fine when I develop but if I leave the site
> unattened for a period of time, mysql times out the connections in the
> pool.
>
> I'd really like to set the maxIdle parameter to 0 so that if there are
> idle connections they leave the pool.  Basically setting the min pool
> size to 0 is what I want to do.  I haven't seen a minPoolSize parameter
> though.
>
> The documentation says if I set maxIdle to 0 that means unlimited.  That
> won't work I guess.  Is there a solution to this problem?
>
> Thanks
> Dennis
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


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