tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Parsons Technical Services" <parsonstechni...@earthlink.net>
Subject Re: JNDI/MYSQL - Too many connections
Date Fri, 09 Apr 2004 11:43:19 GMT
Josh,

Two things come to mind:

1. You are running out of connections. DUH What I mean is that you have more
requests for connections than connections. Probably not your case but had to
point it out.

2. You have a leak and are not recovering the abandoned connections fast
enough.

Going on point two look at the following:
Turn on log abandoned and see if you do have a leak.
Are you closing you resultsets and statements? If not they can/will hold the
connection.
Increase your pool size.
Decrease the removeAbandoned time. If it is a leak.
Ensure that all close commands are in a finally block.

Doug
www.parsonstechnical.com


----- Original Message ----- 
From: "Josh G" <josh@gfunk007.com>
To: <tomcat-user@jakarta.apache.org>
Sent: Friday, April 09, 2004 4:19 AM
Subject: JNDI/MYSQL - Too many connections


> Hi, I'm getting this error after a while from tomcat, even though we're
> running removeAbandoned, and every connection opened is explicitly closed:
>
> Unrecoverable exception. Reason:
> org.apache.commons.dbcp.SQLNestedException: Cannot create
> PoolableConnectionFactory, cause: Server connection failure during
> transaction. Due to underlying exception: 'java.sql.SQLException: Data
> source rejected establishment of connection,  message from server: "Too
> many connections"'.
> Attempted reconnect 3 times. Giving up.
>
com.pirionsystems.he.sql.MySQLIndex.getSiteIdByAlias(MySQLIndex.java:46)
>
com.pirionsystems.he.businessobjects.HeDBDocumentManager.getSiteIdByAlias(He
DBDocumentManager.java:310)
>
com.pirionsystems.he.servlet.HeServletBase.setSite(HeServletBase.java:101)
>
com.pirionsystems.he.servlet.HeServletBase.startupRequest(HeServletBase.java
:85)
>          com.pirionsystems.he.servlet.HeServlet.doGet(HeServlet.java:22)
>          com.pirionsystems.he.servlet.HeServlet.doPost(HeServlet.java:37)
>          javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>          javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>
> Anybody know what I should be looking for?
>
> Cheers,
> -Josh
>
>
>          "Your headgear seems to be emitting a buzzing noise, sir.
>                      Perhaps you have a bee in your bonnet?"
>
>             [ Josh 'G' McDonald ]  --  [ Pirion Systems, Brisbane]
>
> [ 07 3257 0490 ]  --  [ 0415 784 825 ]  --  [ http://www.gfunk007.com/ ]



---------------------------------------------------------------------
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