commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Monica Ferrero" <moni...@activehotels.com>
Subject Re: [DBCP]: Tomcat+MySQL. Intermitent DbcpException: Server configuration
Date Tue, 26 Aug 2003 11:25:12 GMT
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
>>        <parameter>
>>          <name>logAbandoned</name>
>>          <value>true</value>
>>        </parameter>
>>        <parameter>
>>          <name>removeAbandoned</name>
>>          <value>true</value>
>>        </parameter>
>>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




Mime
View raw message