Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 10771 invoked from network); 26 Aug 2003 12:15:05 -0000 Received: from unknown (HELO fwall.activebooking.com) (194.203.126.61) by daedalus.apache.org with SMTP; 26 Aug 2003 12:15:05 -0000 Received: from activehotels.com (bertha.hq.activehotels.com [192.168.1.200]) by fwall.activebooking.com (8.10.1/8.10.1) with SMTP id h7QAY1015359 for ; Tue, 26 Aug 2003 11:34:01 +0100 (BST) Received: from 192.168.1.178 (SquirrelMail authenticated user monicaf) by bertha.activebooking.com with HTTP; Tue, 26 Aug 2003 12:25:12 +0100 (BST) Message-ID: <3805.192.168.1.178.1061897112.squirrel@bertha.activebooking.com> Date: Tue, 26 Aug 2003 12:25:12 +0100 (BST) Subject: Re: [DBCP]: Tomcat+MySQL. Intermitent DbcpException: Server configuration From: "Monica Ferrero" To: In-Reply-To: <3F49108A.3040909@pandora.be> References: <3F49108A.3040909@pandora.be> X-Priority: 3 Importance: Normal X-MSMail-Priority: Normal X-Mailer: SquirrelMail (version 1.2.5) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hello! > OK, first of all what version of DBCP are you using ? The official > build or a nightly one? Official build 1.0 > also the version of commons-pool. 1.0.1 > Do you use the "removeAbandonedTimeout" ? No, I left it to the default value. > The default value is 300sec. (A connection has to be abandoned for 300 > sec) Are there a lot of requests within the last 300 sec before the > DBCP exception? I've looked at the logs when the exception happened once, and there was about 15 web pages queries. At the moment the database it is used quiet heavily as we haven't implemented a cache yet, so that could go easily over 3000 database queries... Now that I write it down it sounds like an awful lot... > The error messages are written on stderr. Do you have a stderr log? Yes, they are written to the logs. I've included the exception again at the end of the mail. Is that what you would like to see? > What is your os? (linux, windows,...) Linux redhat > Dirk Thanks a lot. Monica 003-08-20 04:04:27,308 ERROR [Thread-13] (DBUtil.java:66) - SQLException DBCP could not obtain an idle db connection, pool ex hausted java.sql.SQLException: DBCP could not obtain an idle db connection, pool exhausted at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject (AbandonedObjectPool.java:123) at org.apache.commons.dbcp.PoolingDataSource.getConnection (PoolingDataSource.java:110) at org.apache.commons.dbcp.BasicDataSource.getConnection (BasicDataSource.java:312) at com.ah.auk.db.DBUtil.getDBConnection(DBUtil.java:54) at com.ah.auk.db.DB.checkDBCon(DB.java:36) at com.ah.auk.db.HotelDBReader.getHotelsInGeoEntry (HotelDBReader.java:64) at com.ah.auk.delegates.CountyHelper.getHotelsPerCounty (CountyHelper.java:100) at com.ah.auk.box.CountyListBox.getCounties(CountyListBox.java:124) at com.ah.auk.box.CountyListBox.configure(CountyListBox.java:63) at com.ah.auk.core.BoxManager.configureBoxes(BoxManager.java:41) at com.ah.auk.structure.StructureServlet.doGet (StructureServlet.java:88) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source) at com.ah.auk.context.ContextFilter.doFilter(ContextFilter.java:177) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source) at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardContext.invoke(Unknown Source) at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.coyote.tomcat4.CoyoteAdapter.service (CoyoteAdapter.java:223) at org.apache.jk.server.JkCoyoteHandler.invoke (JkCoyoteHandler.java:261) at org.apache.jk.common.HandlerRequest.invoke (HandlerRequest.java:360) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604) at org.apache.jk.common.ChannelSocket.processConnection (ChannelSocket.java:562) at org.apache.jk.common.SocketConnection.runIt (ChannelSocket.java:679) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run (ThreadPool.java:619) at java.lang.Thread.run(Thread.java:534) 2003-08-20 04:04:27,310 ERROR [Thread-13] (CountyHelper.java:104) - Exception DBCP could not obtain an idle db connection, poo l exhausted java.sql.SQLException: DBCP could not obtain an idle db connection, pool exhausted at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject (AbandonedObjectPool.java:123) at org.apache.commons.dbcp.PoolingDataSource.getConnection (PoolingDataSource.java:110) at org.apache.commons.dbcp.BasicDataSource.getConnection (BasicDataSource.java:312) at com.ah.auk.db.DBUtil.getDBConnection(DBUtil.java:54) at com.ah.auk.db.DB.checkDBCon(DB.java:36) at com.ah.auk.db.HotelDBReader.getHotelsInGeoEntry (HotelDBReader.java:64) at com.ah.auk.delegates.CountyHelper.getHotelsPerCounty (CountyHelper.java:100) at com.ah.auk.box.CountyListBox.getCounties(CountyListBox.java:124) at com.ah.auk.box.CountyListBox.configure(CountyListBox.java:63) at com.ah.auk.core.BoxManager.configureBoxes(BoxManager.java:41) at com.ah.auk.structure.StructureServlet.doGet (StructureServlet.java:88) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source) at com.ah.auk.context.ContextFilter.doFilter(ContextFilter.java:177) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source) at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardContext.invoke(Unknown Source) at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.coyote.tomcat4.CoyoteAdapter.service (CoyoteAdapter.java:223) at org.apache.jk.server.JkCoyoteHandler.invoke (JkCoyoteHandler.java:261) at org.apache.jk.common.HandlerRequest.invoke (HandlerRequest.java:360) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604) at org.apache.jk.common.ChannelSocket.processConnection (ChannelSocket.java:562) at org.apache.jk.common.SocketConnection.runIt (ChannelSocket.java:679) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run (ThreadPool.java:619) at java.lang.Thread.run(Thread.java:534) > Monica Ferrero wrote: > >>Hello! >> >>Sorry not to have given any signs of life... >>Yes, I got an answer in the mySQL list, that pointed out that my number >>of connections 500, was a lot more than the normal value of 100. >>Changing that solved the problem of the Server configuration error, but >>I've gone back to getting java.sql.SQLException: DBCP could not obtain >>an idle db connection, pool exhausted (whole exception follows). >>I thought the configuration >> >> logAbandoned >> true >> >> >> removeAbandoned >> true >> >>would free and log abandoned connections, but it doesn't seem to do it. >>Anyway, I have checked over all my result sets, statements and >>connections and I think they are all closed properly... >> >>So I'm still a bit stuck here... >>Some other person in this list, suggested that there might be some >>problems with the DBCP, could it be so? >>Any other suggestions? >> >>Any help really appreciated. >> >>Monica >> >> > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For > additional commands, e-mail: commons-user-help@jakarta.apache.org