DBCP + Weblogic = Runaway Leaks. Please help



Hi everyone,

I'm facing a serious issue with connection pooling and I'd appreciate
the help/advice of minds way more experienced/smarter than mine in
tacking the problem. I was asked to work on a web project recently,
that I found used no connection pooling. It was opening 4-5
connections per servlet call / JSP. So I decided to use DBCP to
implement pooling. So far so good. My dev environment uses Tomcat
whereas my UAT/Prod is Weblogic.

The app. typically connect to various datasources and the list can
change at runtime. So instead of defining my datasources in an XML
file, I dynamically bind them into JNDI upon start-up and rebind them
whenever the datasource definition is changed (I have webscreens that
allow authorized users to add/remove/edit datasources).

This works v nicely in Tomcat. I stress tested with JMeter to ensure I
didn't have connection leaks and that the pool wasn't growing out of
size. I move this into the Weblogic UAT environment. Its a clustered
env. with 2 servers. Right off the bat, I notice its creating 18-odd
INACTIVE connections to my main Oracle DB in 1 node and about 3 in the
other. I have set maxActive=20, maxIdle=7, maxWait=15000,
logAbandoned=true, removeAbandonedTimeout=600, removeAbandoned=true.
So its strange that's creating so many connections.

As the application runs, the number of connections goes up to 60 in 1
node and 30 in the other. Then, a few minutes later, all connections
get released and both nodes are back to holding 2-3 connections. I
never saw anything like this in my dev Tomcat env and am stumped as to
what's causing this.

Does DBCP not play well with Weblogic? Why are my parameters being
respected in Tomcat and yet tossed aside in Weblogic? At one point, I
had 400 inactive connections from one of the UAT servers to the
database, which locked everybody else out. I've checked everybit of my
code and I'm not leaking connections.

How do I fix this problem? Any ideas/suggestions folks?

Thanks,
Kush

.



Relevant Pages

  • ADO Interop - SQL Server 2000 connections not released
    ... - DB is SQL Server 2000 ... When the ASP page is executed...no matter how many calls to the COM+ ... objects, connections, recordsets, etc. are properly set to nothing upon exit. ... We have tried OLE DB Services=-4 to disable connection pooling and the ...
    (microsoft.public.data.ado)
  • Re: Connection Pooling
    ... the app. ... Since all connections have to be killed anyway, ... > Part of the app is a 'Restore from Backup' form which uses SQLDMO code. ... > I'm starting to think it's to do with connection pooling because the open ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: New Connection on nested calls?
    ... bit confused about the connection pooling. ... >connections are drawn from the pool. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Slow performance after restarting
    ... - 9 connections implies to me 9 concurrent server process or independant ... When you are doing a startup, ... Why are you issuing DML at startup? ... For connection pooling, the connection is supposed to be in the same state ...
    (microsoft.public.sqlserver.programming)
  • Re: Disconnect from sql server database
    ... My guess is that you are using connection pooling. ... > The problem is that after I close all connections to a database in order ... > message saying that the database still has connections. ...
    (microsoft.public.sqlserver.connect)