I guess dead connections are not being recycled properly. The exception
below is a result of something else that occurred with the previously
checked out connection that prevented it from being returned to the
pool. You'll need to trace it back to the original exception that
caused it to get stuck.
Andrus
On Jul 8, 2004, at 3:54 PM, Mike Kienenberger wrote:
> Mike Kienenberger <mkienen..laska.net> wrote:
>> I looked through 15+ database reconnect errors, and they all threw
> exceptions
>> on these three pieces of code (and primarily the last two -- in all
>> but
> two
>> cases).
>>
>> Looking at the code in getConnection makes me think that an error in
>> this
>> code needs to retry the whole connection, so I'm going to try updating
>> PoolManager.getConnection() with two reconnecting error traps and see
>> if
>> that helps.
>
>
> Ok. I now get only these errors when the database is restarted:
> ------
> Caused by: java.sql.SQLException: Can't obtain connection. Request
> timed
> out. Total used connections: 1
> at
> org.objectstyle.cayenne.conn.PoolManager.getConnection(PoolManager.java
> :433)
> at
> org.objectstyle.cayenne.conn.PoolManager.getConnection(PoolManager.java
> :385)
> at
> org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:
> 295)
> ------
>
> Does running the following code in PoolManager.getConnection somehow
> fail to
> free up the connection properly?
> =====
> newConnection.close();
> return newConnection.getConnection();
> =====
>
> I could increase the pool size, but that would just be ignoring the
> problem.
>
> -Mike
>
This archive was generated by hypermail 2.0.0 : Thu Jul 08 2004 - 17:47:52 EDT