tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barak Yaish <ba...@peer39.com>
Subject RE: Tomcat HTTTP Connectior Hangs
Date Mon, 28 Apr 2008 14:12:30 GMT
My mistake, you right. There is one thread waiting for a db connection from
the pool:


> where 0x184e
  [1] java.lang.Object.wait (native method)
  [2] com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable
(BasicResourcePool.java:1,315)
  [3] com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource
(BasicResourcePool.java:557)
  [4] com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource
(BasicResourcePool.java:477)
  [5]
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection
(C3P0PooledConnectionPool.java:525)
  [6] com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection
(AbstractPoolBackedDataSource.java:128)
  [7] org.hibernate.connection.C3P0ConnectionProvider.getConnection
(C3P0ConnectionProvider.java:35)
  [8] org.hibernate.jdbc.ConnectionManager.openConnection
(ConnectionManager.java:417)
  [9] org.hibernate.jdbc.ConnectionManager.getConnection
(ConnectionManager.java:144)
  [10] org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement
(AbstractBatcher.java:139)
  [11] org.hibernate.loader.Loader.prepareQueryStatement (Loader.java:1,561)
  [12] org.hibernate.loader.Loader.doQuery (Loader.java:661)
  [13] org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections
(Loader.java:224)
  [14] org.hibernate.loader.Loader.doList (Loader.java:2,145)
  [15] org.hibernate.loader.Loader.listIgnoreQueryCache (Loader.java:2,029)
  [16] org.hibernate.loader.Loader.list (Loader.java:2,024)
  [17] org.hibernate.loader.hql.QueryLoader.list (QueryLoader.java:392)
  [18] org.hibernate.hql.ast.QueryTranslatorImpl.list
(QueryTranslatorImpl.java:333)
  [19] org.hibernate.engine.query.HQLQueryPlan.performList
(HQLQueryPlan.java:172)
  [20] org.hibernate.impl.SessionImpl.list (SessionImpl.java:1,114)
  [21] org.hibernate.impl.QueryImpl.list (QueryImpl.java:79)
  [22] org.hibernate.ejb.QueryImpl.getResultList (QueryImpl.java:53)
  [23] com.barak.persitence.EntityManagerImpl.all
(EntityManagerImpl.java:148)
  [24] com.barak.deamon.lookup.LookupDaemon.execute (LookupDaemon.java:271)
  [25] com.barak.daemon.StatefulDaemon.run (StatefulDaemon.java:68)


So, my next question is: why this stuck thread causes the entire Tomcat to
hang? This thread used as a daemon (building a mini cache), and not
participate when serving an incoming HTTP request.


The entire (almost) thread dump of Tomcat:

Group system:
  (java.lang.ref.Reference$ReferenceHandler)0x1833
Reference Handler                                               cond.
waiting
  (java.lang.ref.Finalizer$FinalizerThread)0x1834
Finalizer                                                       cond.
waiting
  (java.lang.Thread)0x1835
Signal Dispatcher                                               running
  (java.lang.Thread)0x1836
RMI Scheduler(0)                                                cond.
waiting
  (java.lang.Thread)0x1837
RMI RenewClean-[prod29:37355]				    cond. waiting
  (sun.misc.GC$Daemon)0x1838
GC Daemon                                                       cond.
waiting
  (java.lang.Thread)0x1839
RMI RenewClean-[prod31:45514]			            cond. waiting
  (java.lang.Thread)0x183a
RMI RenewClean-[prod7:46845]			            cond. waiting
  (java.lang.Thread)0x183b
RMI RenewClean-[prod15:33128]				    cond. waiting
  (java.lang.Thread)0x183c
RMI RenewClean-[prod12:45154]				    cond. waiting
Group main:
  (java.lang.Thread)0x183f
main                                                            running
  (java.util.TimerThread)0x1840
Timer-0                                                         cond.
waiting
  (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread)0x1841
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0 cond.
waiting
  (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread)0x1842
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1 cond.
waiting
  (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread)0x1843
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2 cond.
waiting
  (java.util.TimerThread)0x1845
Timer-1                                                         cond.
waiting
  (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread)0x1846
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0 cond.
waiting
  (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread)0x1847
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1 cond.
waiting
  (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread)0x1848
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2 cond.
waiting
  (java.util.TimerThread)0x184a
Timer-2                                                         cond.
waiting
  (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread)0x184b
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0 cond.
waiting
  (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread)0x184c
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1 cond.
waiting
  (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread)0x184d
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2 cond.
waiting
  (com.barak.deamon.lookup.LookupDaemon)0x184e                  Thread-18
cond. waiting
  (com.barak.deamon.logger.LoggerDaemon2)0x184f                 Thread-19
sleeping
  (com.barak.deamon.loadbalancing.LoadBalancerDaemon)0x1850     Thread-20
sleeping
  (java.util.TimerThread)0x1851
Timer-3                                                         cond.
waiting
  (java.lang.Thread)0x1852
ContainerBackgroundProcessor[StandardEngine[Catalina]]          sleeping
  (java.lang.Thread)0x1853
http-80-Monitor                                                 cond.
waiting
  (org.apache.tomcat.util.threads.ThreadWithAttributes)0x1854
TP-Processor1                                                   cond.
waiting
  (org.apache.tomcat.util.threads.ThreadWithAttributes)0x1855
TP-Processor2                                                   cond.
waiting
  (org.apache.tomcat.util.threads.ThreadWithAttributes)0x1856
TP-Processor3                                                   cond.
waiting
  (org.apache.tomcat.util.threads.ThreadWithAttributes)0x1857
TP-Processor4                                                   running
  (java.lang.Thread)0x1858
TP-Monitor                                                      cond.
waiting
  (java.lang.Thread)0x1859
pool-1-thread-1                                                 cond.
waiting
  (java.lang.Thread)0x185a
pool-1-thread-2                                                 cond.
waiting
  (java.lang.Thread)0x185b
pool-1-thread-3                                                 cond.
waiting
  (java.lang.Thread)0x185c
pool-1-thread-4                                                 cond.
waiting
  (java.lang.Thread)0x185d
pool-1-thread-5                                                 cond.
waiting
  (java.lang.Thread)0x185e
pool-1-thread-6                                                 cond.
waiting
  (java.lang.Thread)0x185f
pool-1-thread-7                                                 cond.
waiting
  (java.lang.Thread)0x1860
pool-1-thread-8                                                 cond.
waiting
  (org.apache.tomcat.util.threads.ThreadWithAttributes)0x1959
http-80-Processor552                                            cond.
waiting
  (org.apache.tomcat.util.threads.ThreadWithAttributes)0x195a
http-80-Processor682                                            cond.
waiting
  (org.apache.tomcat.util.threads.ThreadWithAttributes)0x195b
http-80-Processor722                                            cond.
waiting
  (org.apache.tomcat.util.threads.ThreadWithAttributes)0x195c
http-80-Processor729                                            cond.
waiting
  (org.apache.tomcat.util.threads.ThreadWithAttributes)0x195d
http-80-Processor731                                            cond.
waiting
  


Thanks for helping quickly!!

Barak.


-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com] 
Sent: Monday, April 28, 2008 3:35 PM
To: Tomcat Users List
Subject: RE: Tomcat HTTTP Connectior Hangs

> From: Barak Yaish [mailto:barak@peer39.com] 
> Subject: Tomcat HTTTP Connectior Hangs
> 
> thread dump of the JVM running the tomcat does not show 
> any stuck thread

The above is rather hard to believe - you might want to post the thread
dump, or at least non-duplicate parts of it.

Are your database connections not being returned to the pool, perhaps?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message