On Fri, 22 Feb 2002, Glenn Nielsen wrote: > I have been using Tomcat 4.1-dev and its new DBCP DataSource Factory > which uses commons-dbcp, which then uses other commons components > like commons-pool. > > Everything works fine, then all of a sudden GenericPool can no longer > get a db connection from the pool. All attempts to get a connection > from the pool fail. The only way to fix the problem is to stop and > restart Tomcat. In case you ask, the db is running fine, and an > application which uses Torque to manage db connections continues > to work. Only the commons-dbcp exhibits the failure. > > This has happen twice in the last 24 hours, both times were about 10 - 12 > hours after Tomcat started up. The first run was during the day with higher > traffic, the second was overnight with lower traffic. During each run the > DBCP has handled many thousands of connection requests. > > Here is a snippet from the exception: > > 2002-02-22 08:47:53 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp >threw > exception > java.util.NoSuchElementException: Timeout waiting for idle object > at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown >Source) > at org.apache.commons.dbcp.PoolingDataSource.getConnection(Unknown Source) > at > org.apache.taglibs.dbtags.connection.ConnectionTag.doEndTag(ConnectionTag.java:214) > at org.apache.jsp.pastnumsearch$jsp._jspService(pastnumsearch$jsp.java:116) >
Without knowing any details about the pool component (yet -- I plan on giving it a good look eventually), I suspect that you may have a pool leak. Somewhere you're borrowing from the pool and not returning it to the pool. Possibly the return of an object is not in a finally block and an rare exception causes it to lose one object. Then again, I haven't looked at the pool component, so I don't know whether this would be tye symptom for that problem or not. Take what I say with a grain of salt. Although it might be a good place to start looking. regards, michael > I am using the following commons components. > > commons-collections V1.0 release from July 14, 2001. > commons-pool nightly from Feb 1, 2002. > commons-dbcp nightly from Feb 1, 2002. > > Does anyone know of any bugs or changes in any of these which may > be causing the general failure of pooling the dbcp connections? > > Thanks, > > Glenn > > ---------------------------------------------------------------------- > Glenn Nielsen [EMAIL PROTECTED] | /* Spelin donut madder | > MOREnet System Programming | * if iz ina coment. | > Missouri Research and Education Network | */ | > ---------------------------------------------------------------------- > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>