You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2004/06/28 14:19:16 UTC

DO NOT REPLY [Bug 29841] New: - Oracle JDBC Connections from connection pool not used or reused

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29841>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29841

Oracle JDBC Connections from connection pool not used or reused

           Summary: Oracle JDBC Connections from connection pool not used or
                    reused
           Product: Tomcat 5
           Version: 5.0.25
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Unknown
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: tc@disforce.be


My configuration : 
 
Dell PowerEdge 2650 
Mandrake Linux 10 (kernel 2.4) 
Sun Java  1.4.2_04 
Oracle 10g 
JDBC Drivers for oracle 10g (ojdbc14.jar) 
Apache 2.0.48 
Use of mod_jk2 and the apj13 coyote connector 
http application uses http sessions 
 
 
Hello there, 
 
 
I'm having a very serious problem with my oracle database connections. 
To allow reuse of open connection we use a database connection pool. 
 
The configuration in the server.xml is the following : 
 
<Context debug="0" docBase="macq" path="/macq" reloadable="false"> 
                <Resource name="ed/macq" auth="Container" 
type="javax.sql.DataSource"/> 
                <ResourceParams name="ed/macq"> 
                <parameter> 
                        <name>factory</name> 
                                
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value> 
                </parameter> 
                <parameter> 
                        <name>driverClassName</name> 
                        <value>oracle.jdbc.driver.OracleDriver</value> 
                </parameter> 
                <parameter> 
                        <name>url</name> 
                        
<value>jdbc:oracle:thin:@turgon_02.disforce.be:1521:turgon2</value> 
                </parameter> 
                <parameter> 
                        <name>username</name> 
                        <value>macqloader</value> 
                </parameter> 
                <parameter> 
                        <name>password</name> 
                        <value>********</value> 
                </parameter> 
                <parameter> 
                        <name>maxActive</name> 
                        <value>300</value> 
                </parameter> 
                <parameter> 
                        <name>maxIdle</name> 
                        <value>10</value> 
                </parameter> 
                <parameter> 
                        <name>maxWait</name> 
                        <value>10000</value> 
                </parameter> 
		... 
 
The behaviour we see is very strange. 
When starting up tomcat, we see a number of connections being opened. 
That is rather normal. Now for every jsp with database activity a new database 
connection is added until the maximum number of connections is achieved (300 
in this case).  
 
In this first phase the maximum number of users is 5, logically we should see 
no more than five concurrent database connections open. 
 
When looking in TOAD, we see all database connections as inactive so they 
should be reused. 
 
In a second phase of my project a deployment on hundreds of workstations will 
start. I cannot continue with this if my database connections are not being 
resused. 
 
Any help would be greatly appreciated. 
 
 
Tom Colman 
Belgacom 
CBS/DIS/PTE

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