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 2008/06/05 21:39:34 UTC

DO NOT REPLY [Bug 45144] New: using JDBC Data Sources freezes tomcat for some minutes

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

           Summary: using JDBC Data Sources freezes tomcat for some minutes
           Product: Tomcat 6
           Version: 6.0.16
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: clovis.wichoski@gmail.com


Created an attachment (id=22083)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22083)
the full jstack -l output

Hi,

about system:
running on a IBM System x3200 (Xeon dual core) machine with
CentOS Linux 2.6.18-53.1.19.el5 #1 SMP Wed May 7 08:22:53 EDT 2008 x86_64
x86_64 x86_64 GNU/Linux

/opt/java/jdk1.6.0_06/bin/java -server -version
java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)

About the Problem:

when getting new connection from the pool i'm getting many thread BLOCKED for 2
minutes, sometimes seconds, when this occurs today, i take a jstack from JVM
and discover that the org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory is
locked and many threads BLOCKED waiting to lock the same instance of
PoolableConnectionFactory, follow i cut the most important part of the stack
trace:

The blocker part:
"http-80-exec-18" daemon prio=10 tid=0x0000000054387400 nid=0x442f runnable
[0x0000000043137000..0x0000000043138c90]
   java.lang.Thread.State: RUNNABLE
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:129)
        at
com.sap.dbtech.rte.comm.BasicSocketComm.receiveConnect(BasicSocketComm.java:707)
        at
com.sap.dbtech.rte.comm.BasicSocketComm.dbConnectExchange(BasicSocketComm.java:789)
        at
com.sap.dbtech.rte.comm.BasicSocketComm.connectDB(BasicSocketComm.java:233)
        at com.sap.dbtech.rte.comm.SocketComm$1.open(SocketComm.java:38)
        at com.sap.dbtech.jdbc.DriverSapDB.openConnection(DriverSapDB.java:966)
        at com.sap.dbtech.jdbc.DriverSapDB.openByURL(DriverSapDB.java:891)
        at com.sap.dbtech.jdbc.DriverSapDB.connect(DriverSapDB.java:208)
        - locked <0x00002aaab74c6978> (a com.sap.dbtech.jdbc.DriverSapDB)
        at
org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
        at
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
        - locked <0x00002aaab74c6a18> (a
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory)
        at
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:974)
        at
org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
        at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
        at
org.exolab.castor.jdo.engine.DatabaseRegistry.createConnection(DatabaseRegistry.java:399)
        at
org.exolab.castor.jdo.engine.TransactionContextImpl.getConnection(TransactionContextImpl.java:203)
        at
org.exolab.castor.persist.TransactionContext.query(TransactionContext.java:644)
        - locked <0x00002aaafc1adb20> (a
org.exolab.castor.jdo.engine.TransactionContextImpl)
        at
org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:458)
        at
org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:405)
        at
com.supridatta.act.produtos.PedidoAction.onIncluir(PedidoAction.java:70)
        at com.supridatta.bean.DataPersist.gravar(DataPersist.java:213)
        ...
   Locked ownable synchronizers:
        - <0x00002aaad0bfb648> (a
java.util.concurrent.locks.ReentrantLock$NonfairSync)


The blocked part:
"http-80-exec-43" daemon prio=10 tid=0x000000005356f000 nid=0x5619 waiting for
monitor entry [0x0000000044046000..0x0000000044047c10]
   java.lang.Thread.State: BLOCKED (on object monitor)
        at
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
        - waiting to lock <0x00002aaab74c6a18> (a
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory)
        at
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:974)
        at
org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
        at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
        at
org.exolab.castor.jdo.engine.DatabaseRegistry.createConnection(DatabaseRegistry.java:399)
        at
org.exolab.castor.jdo.engine.TransactionContextImpl.getConnection(TransactionContextImpl.java:203)
        at
org.exolab.castor.persist.TransactionContext.query(TransactionContext.java:644)
        - locked <0x00002aaafd720be0> (a
org.exolab.castor.jdo.engine.TransactionContextImpl)
        at
org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:458)
        at
org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:414)
        at com.supridatta.bean.DataPersist.consulta(DataPersist.java:500)
        ...
   Locked ownable synchronizers:
        - <0x00002aaad0bfb648> (a
java.util.concurrent.locks.ReentrantLock$NonfairSync)


-- 
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 45144] using JDBC Data Sources freezes tomcat for some minutes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45144


Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




--- Comment #3 from Mark Thomas <ma...@apache.org>  2008-06-07 07:40:04 PST ---
Closing based on previous comment


-- 
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 45144] using JDBC Data Sources freezes tomcat for some minutes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45144





--- Comment #1 from Clóvis Wichoski <cl...@gmail.com>  2008-06-05 13:19:51 PST ---
This is how the Resource is configured:

<Resource name="jdbc/conces_primary"
              auth="Container"
              type="javax.sql.DataSource"
              username="DBUSER"
              password="secret"
              driverClassName="com.sap.dbtech.jdbc.DriverSapDB"
              url="jdbc:sapdb://dbserver/DBNAME"
              maxActive="300"
              maxIdle="15"
              validationQuery="SELECT NOW() FROM DBA.DUAL"
              minEvictableIdleTimeMillis="1800000"
              testOnBorrow="true"
              timeBetweenEvictionRunsMillis="900000"
              numTestsPerEvictionRun="15"
              initialSize="3"/>


-- 
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 45144] using JDBC Data Sources freezes tomcat for some minutes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45144





--- Comment #2 from Phil Steitz <ph...@steitz.com>  2008-06-07 06:45:37 PST ---
This is not a Tomcat bug. It is a duplicate of
https://issues.apache.org/jira/browse/DBCP-212.   

If you do not really need maxIdle as low as 15 with maxActive at 300,
increasing (or eliminating) the maxIdle setting should reduce incidence, unless
the thrashing is due to abandoned connections, which should be fixed if that is
the case.  Obviously, you should also research what is causing the driver
connect to hang.


-- 
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org