tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Fiol BonnĂ­n <fiol.bon...@terra.es>
Subject Re: Thread stuck at get database connection!
Date Wed, 26 May 2004 18:58:39 GMT
Try setting testWhileIdle=true. Maybe also reduce maxWait.

HTH, but I'm not sure at all.

Antonio


Innovest Ken wrote:

>hello,
>
>I found from my thread dump that 80% of my thread are
>at the following stage, waiting to lock
>PoolableConnectionFactory. This is the cause of my
>Tomcat hanging! Do I need to reconfigure my
>server.xml?
>
>	             <parameter>
>	               <name>maxIdle</name>
>	               <value>10</value>
>	             </parameter>
>	             <parameter>
>	               <name>maxActive</name>
>	               <value>150</value>
>	             </parameter>
>	             <parameter>
>	               <name>driverClassName</name>
>	              
><value>oracle.jdbc.driver.OracleDriver</value>
>	             </parameter>
>	             <parameter>
>	               <name>maxWait</name>
>	               <value>10000</value>
>	             </parameter>
>	             <parameter>
>	               <name>removeAbandoned</name>
>	               <value>false</value>
>	             </parameter>
>	             <parameter>
>	               <name>removeAbandonedTimeout</name>
>	               <value>60</value>
>	             </parameter>
>		     <parameter>
>			<name>logAbandoned</name>
>			<value>true</value>
>		     </parameter>
>		     <parameter>
>	               <name>factory</name>
>	              
><value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>	             </parameter>
>				 <parameter>
>	               <name>username</name>
>	               <value>nokia</value>
>	             </parameter>
>	             <parameter>
>	               <name>password</name>
>	               <value>pswpnokia</value>
>	             </parameter>
>				 <parameter>
>                   <name>validationQuery</name>
>                   <value>select count(*) from
>dual</value>
>                 </parameter>
>	             <parameter>
>	              
><name>timeBetweenEvictionRunsMillis</name>
>	               <value>60000</value>
>	             </parameter>
>	             <parameter>
>	               <name>numTestsPerEvictionRun</name>
>	               <value>3</value>
>	             </parameter>
>	             <parameter>
>	              
><name>minEvictableIdleTimeMillis</name>
>	               <value>120000</value>
>	             </parameter>
>
>
>Following is the extract from thread dump:
>
>"http80-Processor228" daemon prio=1 tid=0x085a94d0
>nid=0x275b waiting for monitor entry
>[acdff000..acdff8d8]
>	at
>org.apache.commons.dbcp.PoolableConnectionFactory.validateObject(PoolableConnectionFactory.java:316)
>	- waiting to lock <0x4d107d78> (a
>org.apache.commons.dbcp.PoolableConnectionFactory)
>	at
>org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:833)
>	at
>org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:140)
>	at
>org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)
>
>
>
>	
>		
>__________________________________
>Do you Yahoo!?
>Friends.  Fun.  Try the all-new Yahoo! Messenger.
>http://messenger.yahoo.com/ 
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>  
>


Mime
View raw message