[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tomcat-user
Subject:    Problem with too many open db connections on Tomcat
From:       "Claus Hausberger" <CHausberger () gmx ! de>
Date:       2011-04-01 11:36:32
Message-ID: 20110401113632.282580 () gmx ! net
[Download RAW message or body]

Hello,

I have a problem with Tomcat and open connections to an Oracle 11g database.

I use Tomcat 5.5, DBCP 1.2 and Hibernate 3.3 + Spring for DB connections.
For political reasons I can not upgrade to new Tomcat versions at the moment.

I have 7 deployed apps on the Tomcat. 4 user a datasource configured for Tomcat \
itself (in context.xml) with a setting of maxActiv=20. This datasource is used by \
Hibernate via JNDI. 3 other apps use their own datasource with all together 15 db \
connections (everyone with maxActive=5).

So I thought that there should be at most 35 connections to the database. But netstat \
on Linux shows that there are on average between 38 and 61.

I used visualvm to look at the MBeans for all apps and there at the datasource. All \
showed numActive=0. According to my google search numActive shows the number of \
active connections. I thought this would show me the number of active DB connections \
that Hibernate is currently using. Am I wrong here? It was weird that all always \
showed 0 for numActive.

Has anyone had a similar problem? How can I find out if and where I have a connection \
leak?

best wishes,

Claus
-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!			
Jetzt informieren: http://www.gmx.net/de/go/freephone

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic