tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nitschke Michael" <mnitsc...@mbi.co.at>
Subject RE: Connection pool exhausted
Date Wed, 02 Jun 2004 09:33:11 GMT
It looks like you are not returning the connection in a propper way.
I mean just to close the resultset is not enough.
I use another connection pool, but I also get this kind of exception.
You have to obtain the statement form the resultset.
The connection from the statement.
Then close the resultset, then the statement.
And then give back the connection to the pool (overwritten version of
close, or a kind of freeConnection)
Never Close the connection. The pool could not reuse this instance
because its closed and so it could not be returned into the pool, and it
runs out of connections.

mfg
Michael Nitschke
-----Original Message-----
From: c157@volny.cz [mailto:c157@volny.cz] 
Sent: Wednesday, June 02, 2004 10:01 AM
To: tomcat-user@jakarta.apache.org
Subject: Connection pool exhausted

Hi all,
I am dveloping small application which uses JDBC connection pool.
This pool I configured according howto on Tomcat's pages.
Sometimes I get below mentioned exception: Connection pool
exhausted.  Could you give me any advice?
My configuration:
Tomcat 5.0/24
DB on localhost MySQL Distrib 4.0.17, for sun-solaris2.9 (sparc)
Thanks,
Petr

javax.servlet.ServletException:
org.apache.commons.dbcp.SQLNestedException: Cannot get a
connection, pool exhausted, cause: Timeout waiting for idle
object
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageCont
extImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tImpl.java:758)
org.apache.jsp.jsp.Catalog_jsp._jspService(Catalog_jsp.java:202)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:298)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFi
lter.java:322)
cz.shop.Controller.Dispatcher.goForward(Dispatcher.java:155)
cz.shop.Controller.Dispatcher.processRequest(Dispatcher.java:88)
cz.shop.Controller.Dispatcher.doGet(Dispatcher.java:166)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFi
lter.java:322)

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.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