You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Barclay A. Dunn" <ba...@happypuppy.com> on 2003/08/08 21:04:41 UTC

Help! heavy traffic is crapping out our site every 5 min! DBCP exceptions

i also asked for help from the tomcat-users list, and we narrowed my problem
down to (surprise) dbcp problems.

we are getting a ton of these errors in our catalina.out and i could use
help in fixing it.

i know they are related to our connection pooling, but not what to do to
fix. my understanding of the underlying mechanics of connection pooling is
somewhat limited, though i have subscribed to this list to remedy that if
possible.

i am using a try / catch / finally block to close EVERY connection in my
code. i mean 100%. but i think i am still seeing leaks.

thanks,
barclay

i have put two different but related error messages in here:

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.ja
va:110)
        at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:3
12)
        at com.happypuppy.util.HPSql.getConnection(HPSql.java:21)
        at org.apache.jsp.index_jsp._jspService(index_jsp.java:222)
...

AND

org.apache.commons.dbcp.DbcpException: java.sql.SQLException:
[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
        at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:85)
        at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect
ionFactory.java:184)
        at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown Source)
        at
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool
.java:117)
        at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
va:110)
        at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:3
12)
        at com.happypuppy.util.HPSql.getConnection(HPSql.java:21)
        at com.happypuppy.util.HPUser.isLoggedIn(HPUser.java:121)
        at
org.apache.jsp.checkLoggedIn_jsp._jspService(checkLoggedIn_jsp.java:56)
        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
...


Re: Help! heavy traffic is crapping out our site every 5 min! DBCP exceptions

Posted by "Sean W. Ferguson" <se...@comcast.net>.
Well, I know nothing about the dbcp, but perhaps its actually running 
out of available pools?

Barclay A. Dunn wrote:
> i also asked for help from the tomcat-users list, and we narrowed my problem
> down to (surprise) dbcp problems.
> 
> we are getting a ton of these errors in our catalina.out and i could use
> help in fixing it.
> 
> i know they are related to our connection pooling, but not what to do to
> fix. my understanding of the underlying mechanics of connection pooling is
> somewhat limited, though i have subscribed to this list to remedy that if
> possible.
> 
> i am using a try / catch / finally block to close EVERY connection in my
> code. i mean 100%. but i think i am still seeing leaks.
> 
> thanks,
> barclay
> 
> i have put two different but related error messages in here:
> 
> 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.ja
> va:110)
>         at
> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:3
> 12)
>         at com.happypuppy.util.HPSql.getConnection(HPSql.java:21)
>         at org.apache.jsp.index_jsp._jspService(index_jsp.java:222)
> ...
> 
> AND
> 
> org.apache.commons.dbcp.DbcpException: java.sql.SQLException:
> [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
>         at
> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
> ctionFactory.java:85)
>         at
> org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect
> ionFactory.java:184)
>         at
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown Source)
>         at
> org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool
> .java:117)
>         at
> org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
> va:110)
>         at
> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:3
> 12)
>         at com.happypuppy.util.HPSql.getConnection(HPSql.java:21)
>         at com.happypuppy.util.HPUser.isLoggedIn(HPUser.java:121)
>         at
> org.apache.jsp.checkLoggedIn_jsp._jspService(checkLoggedIn_jsp.java:56)
>         at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> ...
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
>