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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to