Connections not being reused

From: Chesko, Jason <jason.chesko@xxx.com>
Date: Thu Sep 26 2002 - 15:13:39 PDT

We've begun using SAPDB connecting through JDBC. In some instances we're
seeing connections in the Resin connection pool being closed and not reused.
We believe we've either encountered a bug with the SAPDB JDBC driver or we
are doing something stupid in our code. However, the results we are seeing
in the connection pool log aren't what we'd expect to see.

If we were simply not closing a connection, I would expect to see repeated
create's in the sql log. We are seeing that, but we're also seeing
connections being closed, but not being reused.

For example, if I hit one of our simple pages that is working correctly and
then hit refresh a number of times I'll see the following:

[15:52:13.039] create 61:jdbc/sapdb [active:1, total:2]
[15:52:21.320] reuse 61:jdbc/sapdb [total:2]
[15:52:22.164] reuse 61:jdbc/sapdb [total:2]
[15:52:23.054] reuse 61:jdbc/sapdb [total:2]

This is obviously ideal behavior as 1 connection is created and then reused.

The output from one of our pages causing a problem is as follows:

[15:52:50.460] create 62:jdbc/sapdb [active:1, total:2]
[15:52:50.491] close 62:jdbc/sapdb
[15:52:51.835] create 63:jdbc/sapdb [active:1, total:3]
[15:52:51.866] close 63:jdbc/sapdb
[15:52:52.882] create 64:jdbc/sapdb [active:1, total:4]
[15:52:52.913] close 64:jdbc/sapdb
[15:52:53.897] create 65:jdbc/sapdb [active:1, total:5]
[15:52:53.929] close 65:jdbc/sapdb

The connections are being created and then being closed, but remaining in
the pool (until a close-idle occurs) and not being reused. If we were
failing to close our connections, I would expect to NOT see the "close"
entry in the log. It's that "close" entry that really has us confused.

We're running resin 2.1.4 with Sun 1.4.0. Can anyone provide an example
that would cause this to happen, or have any idea how we can isolate the
problem?

Thanks,
Jason Chesko
Received on Thu 26 Sep 2002 15:13:39 -0700

This archive was generated by hypermail 2.1.8 : Thu Sep 28 2006 - 20:17:16 PDT