commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trenton D. Adams" <tre...@athabascau.ca>
Subject Re: failed to find abandoned connection
Date Wed, 23 Mar 2005 16:49:28 GMT
Well ours works too, if a connection is abandoned in the traditional 
way.  But when it's not, it doesn't work.  And I can't figure out how 
it's not triggering abandoned connections.  Ahhhhhh. :)

Jonathan Cowherd wrote:
> These settings work really well for me:
> 
> initialSize=1
> maxActive=20  // or whatever is appropriate for your db
> minIdle=1
> maxIdle=2
> timeBetweenEvictionRunsMillis=60000
> minEvictableIdleTimeMillis=60000
> 
> Jonathan
> 
> On Tue, 22 Mar 2005 15:48:06 -0700, Trenton D. Adams
> <trenta@athabascau.ca> wrote:
> 
>>dbcp was unable to find our abandoned connections.  The pool slowly
>>creeped up to the limit, and then just started failing, instead of
>>cleaning up the connections.  I do know that my settings work, because I
>>made some of our code not release connections back to the pool, and it
>>detected them.  So, why it couldn't find the ones we have in production,
>>I don't know.
>>
>>What makes a connection look like it's been abandoned to the dbcp code?
>>
>>Any ideas?  I'm getting an exception like this...
>>
>>Mar 22 14:53:19 MST 2005: Error: attempting to get a free connection.
>>org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
>>pool exhausted
>>         at
>>org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:183)
>>         at java.sql.DriverManager.getConnection(DriverManager.java:512)
>>         at java.sql.DriverManager.getConnection(DriverManager.java:193)
>>         at ca.montage.banner.db.DBCPPool.getConnection(DBCPPool.java:163)
>>         at
>>ca.montage.banner.db.DBConnectionManager.getConnection(DBConnectionManager.java:204)
>>         at
>>ca.montage.banner.server.RemoteCatalog.getSubjectList(RemoteCatalog.java:39)
>>         at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
>>         at
>>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>         at java.lang.reflect.Method.invoke(Method.java:324)
>>         at
>>sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
>>         at sun.rmi.transport.Transport$1.run(Transport.java:148)
>>         at java.security.AccessController.doPrivileged(Native Method)
>>         at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
>>         at
>>sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
>>         at
>>sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
>>         at java.lang.Thread.run(Thread.java:534)
>>Caused by: java.util.NoSuchElementException
>>         at
>>org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:744)
>>         at
>>org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:74)
>>         at
>>org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:175)
>>         ... 15 more
>>
>>--
>>Trenton D. Adams
>>Web Programmer Analyst
>>Navy Penguins at your service!
>>Athabasca University
>>(780) 675-6195
>>:wq!
>>
>>__
>>    This communication is intended for the use of the recipient to whom it
>>    is addressed, and may contain confidential, personal, and or privileged
>>    information. Please contact us immediately if you are not the intended
>>    recipient of this communication, and do not copy, distribute, or take
>>    action relying on it. Any communications received in error, or
>>    subsequent reply, should be deleted or destroyed.
>>---
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 


-- 
Trenton D. Adams
Web Programmer Analyst
Navy Penguins at your service!
Athabasca University
(780) 675-6195
:wq!

---------------------------------------------------------------------
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