aspose file tools*
The moose likes JDBC and the fly likes Connection Pools won't recycle connections Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connection Pools won Watch "Connection Pools won New topic
Author

Connection Pools won't recycle connections

John Sam
Greenhorn

Joined: Oct 31, 2003
Posts: 1
Hello,
I am experiencing a problem with connection pooling. Our Java app is using Weblogic61SP3 and an Oracle 8.1.7 database, connection via oracle:thin.
Each call by the application to our production database, opens up a new connection. Once the db call is done the connection isn't recycled and sent back into the pool, like it should. It's kept alive, and each subsequent db call opens up another db connection. Connections keep increasing until the max connection limit is reached. We are sure to close all connections within the code. Looking at these sessions on the Oracle side, shows each of these 'hung' connections to be inactive.
We pointed the same app to our test and staging databases (which are identical to production) and the connections shrink fine. Is there some setting on the Oracle side that I'm missing? They're on different boxes. Is WEblogic the culprit? Any help would be greatly appreciated.
Thanks
[ October 31, 2003: Message edited by: John Sam ]
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

I once worked in an Oracle shop.

Our app was experiencing quirky behaviour, and we eventually tracked it to the database holding open connections. It would *appear* to the pool that connections were being released, but the db itself still held them open.

When confronted with this, Oracle fessed up there was a bug in the Oracle connection pooling, on the DB itself, not the driver. Ok, it might not be that they so much as 'fessed up', as we discovered the OTN entry regarding that known issue. "Known" only to Oracle I guess. :roll:

If you have a half-decent support arrangement with Oracle, you might investigate this. I'd search OTN for you, but I no longer have access.
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1135

Mike,
OTN requires registration in order to access it, but registration is free. So OTN is accessible to everyone. I think, perhaps, you were referring to MetaLink, which requires that you have an active Oracle support contract in order to access it.
[Just wanted to clarify that.]
Good Luck,
Avi.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8997
    
    9

Originally posted by John Sam:

Each call by the application to our production database, opens up a new connection. Once the db call is done the connection isn't recycled and sent back into the pool, like it should.

You ARE returning connections to the pool by invoking connection.close() on each instance inside a finally block (so it gets returned whether an exception occurs or not), right?


[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection Pools won't recycle connections