https://issues.apache.org/bugzilla/show_bug.cgi?id=44683

           Summary: connection pool is not being kept alive by dbcp
           Product: Tomcat 6
           Version: 6.0.16
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


DBCP should keep connections alive while idle. On my development machine I am
using Tomcat 6.0.14 and everything works fine. When I set (for test purposes)
timeBetweenEvictionRunsMillis="1000" (1 second), I see a list of 'select 1'
queries in the mysql-general-log, just as one would expect. The connections are
being kept alive, as they should. 

This, however, is not the case using Tomcat 6.0.16. The 'select 1' statements
do not appear, and the connections fails after eight hours of no traffic as one
would expect. 

The site is otherwise functioning normal with fast database access.

Boring fragment of mysql-general.log using tomcat 6.0.14:
---------------------------------------------------------
                    320 Query       select 1
080326 22:20:56     319 Query       select 1
                    320 Query       select 1
080326 22:20:57     319 Query       select 1
                    320 Query       select 1
080326 22:20:58     319 Query       select 1
                    320 Query       select 1
080326 22:20:59     319 Query       select 1
                    320 Query       select 1
080326 22:21:00     319 Query       select 1
                    320 Query       select 1
080326 22:21:01     319 Query       select 1
                    320 Query       select 1
----------------------------------------------


context.xml in use
------------------
(changed username and password)

<Context path="/aom2" reloadable="true" docBase="aom2">
   <Resource name="jdbc/artomatic001" 
   auth="Container" 
   driverClassName="com.mysql.jdbc.Driver" 
   type="javax.sql.DataSource" 
   url="jdbc:mysql://localhost:3308/artomatic001?autoReconnect=true" 
   maxActive="100" 
   maxIdle="30" 
   maxWait="10000" 
   username="myusername" 
   password="mypassword" 
   validationQuery="select 1" 
   testOnBorrow="true" 
   testWhileIdle="true"  
   timeBetweenEvictionRunsMillis="1000" 
   minEvictableIdleTimeMillis="3000000" 
   removeAbandoned="true" 
   removeAbandonedTimeout="300" 
   logAbandoned="true" />
-----------------------------------------------

Versions:
---------
OS: Open Suse Linux 10.1 X86-64
MySql: 5.0.51a-log
MySql connector: 5.1.6. placed in tomcat/lib
No other db-connectors in application space.
Tomcat 6.0.14 (works fine) and Tomcat 6.0.16 (works not)

Only other activity on same database, even on db server is PHPmyadmin


Regards,

Jan-Willem Arnold


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to