tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Bainbridge <ja...@jblinux.org>
Subject Re: DB Connection
Date Mon, 26 May 2003 21:04:30 GMT
On Tue, 27 May 2003 03:10, Jan Behrens wrote:
>  The funny thing is this:
> it works quite well for some time, but as soon as load on the app increases
> the error appears. I therefore thought it must be related to the number of
> open transactions but I am not sure.

You could have said it was load related, from your posts it seemed like DB 
connectivity stopped working completely all of a sudden. Found this in an old 
newsgroup post:

"MySQL will quit accepting connections after some saturation point (this is
configurable, see the MySQL manual, you need to adjust the "max_connections"
variable).

What you should really be doing is using a connection pool...most
applications, even under heavy load, can get by with 5-10 connections that
are pooled with no appreciable slow down."

I''d say your custom code isn't handling the DB connections too well, look 
into setting up a JNDI datasource and use DBCP, there is some documentation 
on this at:
 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html

Regards,
-- 
Jason Bainbridge
KDE Web Team - http://kde.org 
webmaster@kde.org 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message