[opencms-dev] Problem with Connection Pool
Joe Desbonnet
jdesbonnet at gmail.com
Thu Sep 7 17:21:07 CEST 2006
Do you have scripts that access the database? If so it's more than
likely that one (or more) are failing to release the connection after
using it. Somethings that simply because the programmer failed to
close the db, sometimes because an error occurs before the close
statement is reached.
You should surround any block of code that gets a db handle with a
try/catch/finally
and release the handle in the finally clause.
Joe.
On 9/7/06, RAJ <rajparikh7575 at gmail.com> wrote:
> Hi All,
> We have installed OpenCms version 6.0.3 on websphere 6.0 and oracle
> 8.i environment. My problem is, every 2 or 3 days website goes down and
> throws following exception. Exception Says Connection pool exhausted. After
> resetting the connection pool it works fine for another 2 or 3 day and start
> throwing same exception. What
> could be the possible reason ?
>
> Thanks
> Rupesh
>
> Caused by: org.opencms.db.CmsDbSqlException: An SQL error
> occurred when executing the following query: .
> at org.opencms.db.generic.CmsVfsDriver.readResource
> (CmsVfsDriver.java(Compiled Code))
> at
> org.opencms.db.CmsDriverManager.readResource(CmsDriverManager.java(Compiled
> Code))
> at
> org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager.java(Inlined
> Compiled Code))
> ... 26 more
> Caused by: org.apache.commons.dbcp.SQLNestedException:
> Cannot get a connection, pool exhausted
> at
> org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java(Compiled
> Code))
> at java.sql.DriverManager.getConnection
> (DriverManager.java(Compiled Code))
> at
> java.sql.DriverManager.getConnection(DriverManager.java(Inlined
> Compiled Code))
> at
> org.opencms.db.CmsSqlManager.getConnectionByUrl(CmsSqlManager.java(Inlined
> Compiled Code))
> at
> org.opencms.db.generic.CmsSqlManager.getConnection(CmsSqlManager.java(Compiled
> Code))
> at
> org.opencms.db.generic.CmsSqlManager.getConnection(CmsSqlManager.java(Compiled
> Code))
> ... 29 more
> Caused by: java.util.NoSuchElementException : Timeout
> waiting for idle object
> at
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java(Compiled
> Code))
> ... 35 more
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
>
More information about the opencms-dev
mailing list