Re: Problem with too many open db connections on Tomcat

2011-04-04 Thread Claus Hausberger
Hi Mark,

thank you very much. This is extremely helpful!!!

best wishes,

Claus


 Original-Nachricht 
 Datum: Fri, 01 Apr 2011 14:58:25 +0100
 Von: Mark Thomas ma...@apache.org
 An: Tomcat Users List users@tomcat.apache.org
 Betreff: Re: Problem with too many open db connections on Tomcat

 On 01/04/2011 14:56, Claus Hausberger wrote:
  
   Original-Nachricht 
  Datum: Fri, 01 Apr 2011 14:49:56 +0100
  Von: Mark Thomas ma...@apache.org
  An: Tomcat Users List users@tomcat.apache.org
  Betreff: Re: Problem with too many open db connections on Tomcat
  
  On 01/04/2011 13:38, Claus Hausberger wrote:
 
   Original-Nachricht 
  Datum: Fri, 01 Apr 2011 12:44:28 +0100
  Von: Mark Thomas ma...@apache.org
  An: Tomcat Users List users@tomcat.apache.org
  Betreff: Re: Problem with too many open db connections on Tomcat
 
  On 01/04/2011 12:36, Claus Hausberger wrote:
  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.
 
  Which context.xml file? Exactly where is it located?
 
  Mark
 
 
  Hi Mark,
 
  the file is in the Tomcat folder under:
 
  conf/context.xml
 
  this is the config:
 
  Resource name=jdbc/myDS auth=Container
type=javax.sql.DataSource
  driverClassName=oracle.jdbc.OracleDriver
url=jdbc:oracle:thin:@my-oracle-host:mysid username=xxx
password=XXX maxActive=20 maxIdle=10 maxWait=-1
  /
 
  And there is the problem. conf/context.xml provides the defaults for
  every web application so every context deployed on that instance will
  have a resource as configured as above.
 
  If you want a shared resource, define it in server.xml and put a
  resource link in conf/context.xml.
 
  Mark
 
  
  Hi Mark,
  
  thanks. Do I understand this correctly? If my file (context.xml) defines
 maxActive=20 and I have 4 apps using this, everyone get's it's own 20
 connections, making it at most 80?
 
 Correct.
 
  I thought this would be one pool shared by all. 
 
 Nope.
 
  I will try it as you suggested with server.xml.
 
 That should fix it.
 
 Mark
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 

-- 
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit 
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl

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



Re: Problem with too many open db connections on Tomcat

2011-04-01 Thread Mark Thomas
On 01/04/2011 12:36, Claus Hausberger wrote:
 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.

Which context.xml file? Exactly where is it located?

Mark



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



Re: Problem with too many open db connections on Tomcat

2011-04-01 Thread Claus Hausberger

 Original-Nachricht 
 Datum: Fri, 01 Apr 2011 12:44:28 +0100
 Von: Mark Thomas ma...@apache.org
 An: Tomcat Users List users@tomcat.apache.org
 Betreff: Re: Problem with too many open db connections on Tomcat

 On 01/04/2011 12:36, Claus Hausberger wrote:
  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.
 
 Which context.xml file? Exactly where is it located?
 
 Mark
 

Hi Mark,

the file is in the Tomcat folder under:

conf/context.xml

this is the config:

Resource name=jdbc/myDS auth=Container
type=javax.sql.DataSource driverClassName=oracle.jdbc.OracleDriver
url=jdbc:oracle:thin:@my-oracle-host:mysid username=xxx
password=XXX maxActive=20 maxIdle=10 maxWait=-1
/


regards,

Claus


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

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

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



RE: Problem with too many open db connections on Tomcat

2011-04-01 Thread Propes, Barry L
Are you able to insert these attributes in the Resource tag?

timeBetweenEvictionRunsMillis=-1
minEvictableIdleTimeMillis=5000
poolPreparedStatements=true
removeAbandoned=true
removeAbandonedTimeout=300

I have these attributes nested in my Resource element - I never used 5.5 but 
use 6.0.29 and I believe it helps with potential rogue connections.


-Original Message-
From: Claus Hausberger [mailto:chausber...@gmx.de]
Sent: Friday, April 01, 2011 7:38 AM
To: Tomcat Users List
Subject: Re: Problem with too many open db connections on Tomcat


 Original-Nachricht 
 Datum: Fri, 01 Apr 2011 12:44:28 +0100
 Von: Mark Thomas ma...@apache.org
 An: Tomcat Users List users@tomcat.apache.org
 Betreff: Re: Problem with too many open db connections on Tomcat

 On 01/04/2011 12:36, Claus Hausberger wrote:
  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.

 Which context.xml file? Exactly where is it located?

 Mark


Hi Mark,

the file is in the Tomcat folder under:

conf/context.xml

this is the config:

Resource name=jdbc/myDS auth=Container
type=javax.sql.DataSource driverClassName=oracle.jdbc.OracleDriver
url=jdbc:oracle:thin:@my-oracle-host:mysid username=xxx
password=XXX maxActive=20 maxIdle=10 maxWait=-1
/


regards,

Claus




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


--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis 
zu 50,- Euro! https://freundschaftswerbung.gmx.de

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


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



Re: Problem with too many open db connections on Tomcat

2011-04-01 Thread Mark Thomas
On 01/04/2011 13:38, Claus Hausberger wrote:
 
  Original-Nachricht 
 Datum: Fri, 01 Apr 2011 12:44:28 +0100
 Von: Mark Thomas ma...@apache.org
 An: Tomcat Users List users@tomcat.apache.org
 Betreff: Re: Problem with too many open db connections on Tomcat
 
 On 01/04/2011 12:36, Claus Hausberger wrote:
 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.

 Which context.xml file? Exactly where is it located?

 Mark

 
 Hi Mark,
 
 the file is in the Tomcat folder under:
 
 conf/context.xml
 
 this is the config:
 
 Resource name=jdbc/myDS auth=Container
   type=javax.sql.DataSource driverClassName=oracle.jdbc.OracleDriver
   url=jdbc:oracle:thin:@my-oracle-host:mysid username=xxx
   password=XXX maxActive=20 maxIdle=10 maxWait=-1
 /

And there is the problem. conf/context.xml provides the defaults for
every web application so every context deployed on that instance will
have a resource as configured as above.

If you want a shared resource, define it in server.xml and put a
resource link in conf/context.xml.

Mark



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



Re: Problem with too many open db connections on Tomcat

2011-04-01 Thread Claus Hausberger

 Original-Nachricht 
 Datum: Fri, 01 Apr 2011 14:49:56 +0100
 Von: Mark Thomas ma...@apache.org
 An: Tomcat Users List users@tomcat.apache.org
 Betreff: Re: Problem with too many open db connections on Tomcat

 On 01/04/2011 13:38, Claus Hausberger wrote:
  
   Original-Nachricht 
  Datum: Fri, 01 Apr 2011 12:44:28 +0100
  Von: Mark Thomas ma...@apache.org
  An: Tomcat Users List users@tomcat.apache.org
  Betreff: Re: Problem with too many open db connections on Tomcat
  
  On 01/04/2011 12:36, Claus Hausberger wrote:
  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.
 
  Which context.xml file? Exactly where is it located?
 
  Mark
 
  
  Hi Mark,
  
  the file is in the Tomcat folder under:
  
  conf/context.xml
  
  this is the config:
  
  Resource name=jdbc/myDS auth=Container
  type=javax.sql.DataSource
 driverClassName=oracle.jdbc.OracleDriver
  url=jdbc:oracle:thin:@my-oracle-host:mysid username=xxx
  password=XXX maxActive=20 maxIdle=10 maxWait=-1
  /
 
 And there is the problem. conf/context.xml provides the defaults for
 every web application so every context deployed on that instance will
 have a resource as configured as above.
 
 If you want a shared resource, define it in server.xml and put a
 resource link in conf/context.xml.
 
 Mark
 

Hi Mark,

thanks. Do I understand this correctly? If my file (context.xml) defines 
maxActive=20 and I have 4 apps using this, everyone get's it's own 20 
connections, making it at most 80?

I thought this would be one pool shared by all. 
I will try it as you suggested with server.xml.

best wishes,

Claus




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

-- 
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit 
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl

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



Re: Problem with too many open db connections on Tomcat

2011-04-01 Thread Mark Thomas
On 01/04/2011 14:56, Claus Hausberger wrote:
 
  Original-Nachricht 
 Datum: Fri, 01 Apr 2011 14:49:56 +0100
 Von: Mark Thomas ma...@apache.org
 An: Tomcat Users List users@tomcat.apache.org
 Betreff: Re: Problem with too many open db connections on Tomcat
 
 On 01/04/2011 13:38, Claus Hausberger wrote:

  Original-Nachricht 
 Datum: Fri, 01 Apr 2011 12:44:28 +0100
 Von: Mark Thomas ma...@apache.org
 An: Tomcat Users List users@tomcat.apache.org
 Betreff: Re: Problem with too many open db connections on Tomcat

 On 01/04/2011 12:36, Claus Hausberger wrote:
 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.

 Which context.xml file? Exactly where is it located?

 Mark


 Hi Mark,

 the file is in the Tomcat folder under:

 conf/context.xml

 this is the config:

 Resource name=jdbc/myDS auth=Container
 type=javax.sql.DataSource
 driverClassName=oracle.jdbc.OracleDriver
 url=jdbc:oracle:thin:@my-oracle-host:mysid username=xxx
 password=XXX maxActive=20 maxIdle=10 maxWait=-1
 /

 And there is the problem. conf/context.xml provides the defaults for
 every web application so every context deployed on that instance will
 have a resource as configured as above.

 If you want a shared resource, define it in server.xml and put a
 resource link in conf/context.xml.

 Mark

 
 Hi Mark,
 
 thanks. Do I understand this correctly? If my file (context.xml) defines 
 maxActive=20 and I have 4 apps using this, everyone get's it's own 20 
 connections, making it at most 80?

Correct.

 I thought this would be one pool shared by all. 

Nope.

 I will try it as you suggested with server.xml.

That should fix it.

Mark



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



Re: Problem with too many open db connections on Tomcat

2011-04-01 Thread Henry Lu
Is there a way to encrypt the password in the  Resource tag and tomcat 
can still read it and decrypt?


-Henry

On 4/1/2011 9:58 AM, Mark Thomas wrote:

On 01/04/2011 14:56, Claus Hausberger wrote:

 Original-Nachricht 

Datum: Fri, 01 Apr 2011 14:49:56 +0100
Von: Mark Thomasma...@apache.org
An: Tomcat Users Listusers@tomcat.apache.org
Betreff: Re: Problem with too many open db connections on Tomcat
On 01/04/2011 13:38, Claus Hausberger wrote:

 Original-Nachricht 

Datum: Fri, 01 Apr 2011 12:44:28 +0100
Von: Mark Thomasma...@apache.org
An: Tomcat Users Listusers@tomcat.apache.org
Betreff: Re: Problem with too many open db connections on Tomcat
On 01/04/2011 12:36, Claus Hausberger wrote:

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.

Which context.xml file? Exactly where is it located?

Mark


Hi Mark,

the file is in the Tomcat folder under:

conf/context.xml

this is the config:

Resource name=jdbc/myDS auth=Container
type=javax.sql.DataSource

driverClassName=oracle.jdbc.OracleDriver

url=jdbc:oracle:thin:@my-oracle-host:mysid username=xxx
password=XXX maxActive=20 maxIdle=10 maxWait=-1
 /

And there is the problem. conf/context.xml provides the defaults for
every web application so every context deployed on that instance will
have a resource as configured as above.

If you want a shared resource, define it in server.xml and put a
resource link in conf/context.xml.

Mark


Hi Mark,

thanks. Do I understand this correctly? If my file (context.xml) defines 
maxActive=20 and I have 4 apps using this, everyone get's it's own 20 
connections, making it at most 80?

Correct.


I thought this would be one pool shared by all.

Nope.


I will try it as you suggested with server.xml.

That should fix it.

Mark



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





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



Re: Problem with too many open db connections on Tomcat

2011-04-01 Thread Mark Thomas
On 01/04/2011 15:06, Henry Lu wrote:
 Is there a way to encrypt the password in the  Resource tag and tomcat
 can still read it and decrypt?

1. Please don't hijack someone else's thread.

2. Look at the docs, in particular the FAQs before posting.

Mark



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