Thank You all who responded; Did not want to waste your time, hence delayed response.
To make sure no customization has been made on my end I have completely rebuilt system: Install OS (Ubuntu 14.04.2 LTS) including reformat of all drives, selected tomcat7 and ssh server during install when asked. Run apt-get update and upgrade, rebooted, checked java -version, this time shows OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1). So far this is out of the box setup. Created directory /var/lib/tomcat7/lib, as this directory is referenced in catalina properties as path for common loader (common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,....) and placed odbc7.jar into it. Now I modify /etc/tomcat7/context.xml adding following: <Resource name="*******" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" url="jdbc:oracle:thin:@//myserver:1521/myfqservicename" username="******" password="********" maxActive="20" maxIdle="10" maxWait="-1"/> So to be clear, no application have been deployed (except what came with tomcat, ie 'ROOT"), and no user connected. No errors in catalina.out. Now, time to check database connections: SQL>select machine, username, count (1) from v$session where machine = '**' group by machine, username; MACHINE USERNAME COUNT(1) --------- ------------- ---------- ** ******** 50 When I stop tomcat all connections are gone. Now, above context setting (except factory=... which I just added) works fine in tomcat6, java6 environment, target database is the same. Could anyone sent me working pool definition for: Ubunutu 14, tomcat7, java7, oracle12c or 11gR2. And, most importantly, is this reproducible? Thank you all again. Red On 02/24/2015 05:54 PM, Filip Hanik wrote: > unless DBCP changed of course. > > I would add > the following property to your <Resource> element > > > factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" > > http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html > > > > On Tue, Feb 24, 2015 at 3:47 PM, Christopher Schultz < > ch...@christopherschultz.net> wrote: > > Red, > > On 2/24/15 4:20 PM, Red wrote: > >>> OS: Ubuntu 14.04.2 LTS Oracle: 12.1.0.1.0 or 11.2.0.3.0 Tomcat: > >>> 7.0.52-1ubuntu0.1 odjbc: Ojdbc6 or Ojdbc7 (placed in > >>> /var/lib/tomcat7/lib) java version "1.8.0_31" of "1.7.0_65" > >>> > >>> Context.xml: <Resource name="*********1" auth="Container" > >>> type="javax.sql.DataSource" > >>> driverClassName="oracle.jdbc.OracleDriver" > >>> url="jdbc:oracle:thin:@//*********:1521/********" minIdle="1" > >>> username="*******" password="*******" maxActive="10" maxIdle="10" > >>> maxWait="-1" /> <Resource name="******2" auth="Container" > >>> type="javax.sql.DataSource" > >>> driverClassName="oracle.jdbc.OracleDriver" > >>> url="jdbc:oracle:thin:@//*******:1521/**********" > >>> username="*******" password="**********" maxActive="20" > >>> maxIdle="10" maxWait="-1" /> > >>> > >>> Immediately after tomcat startup, number of connection goes up > >>> until it reaches below: > >>> > >>> SQL> select machine, username, count (1) from v$session group by > >>> machine, username; > >>> > >>> MACHINE USERNAME COUNT(1) --------- > >>> --------------------- ---------- tc ******1 > >>> 40 tc ******2 60 > >>> > >>> Then, after a while connection count drops to: > >>> > >>> MACHINE USERNAME COUNT(1) --------- > >>> --------------------- ---------- tc ******1 6 > >>> tc ******2 60 > >>> > >>> > >>> > >>> I have commented all other pools, most fail due to lack of > >>> resources on database side (hundreeds of connections). Connection > >>> are opened if pool is defined in context.xml, even if actually not > >>> used anywhere. > >>> > >>> Catalina.out gives me nothing for two pools, bunch of errors with 3 > >>> or more, but those seem to be due to exhaustion of databases > >>> availability. > >>> > >>> Looked up oracle support, nothing of use there. All of this works > >>> fine with tomcat6, java6, oracle 11g or 12c > > So which one of these makes a difference? Tomcat's connection pool > didn't change dramatically between Tomcat 6 and 7. The Java version > likely has nothing to do with it, and the Oracle version also likely > has nothing to do with it. > > So what's the problem? > > Has your application's user behavior changed in any way? Say, an > increase in traffic? > > What you describe sounds an awful lot like poor resource management in > the application itself. > > 1. Are you sure every part of your application is using your JDBC pools? > > 2. Read this: > > http://blog.christopherschultz.net/index.php/2009/03/16/properly-handling-pooled-jdbc-connections/ > > -chris >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> >