On 22/03/2013 14:56, Julien Martin wrote: > Hi, > You mean if I set maxActive to 1?
> J. > > 2013/3/22 Pid <p...@pidster.com> > >> On 22/03/2013 14:42, Julien Martin wrote: >>> @Chuck: thanks for the link. I have read it. Umm... the thing is I don't >>> close my connection manually. I use Spring. Here is my configuration: >>> >>> <bean class="org.apache.commons.dbcp.BasicDataSource" >>> destroy-method="close" id="dataSource"> >>> <property name="driverClassName" value="${database.driverClassName}" /> >>> <property name="url" value="${database.url}" /> >>> <property name="username" value="${database.username}" /> >>> <property name="password" value="${database.password}" /> >>> <property name="testOnBorrow" value="true" /> >>> <property name="testOnReturn" value="true" /> >>> <property name="testWhileIdle" value="true" /> >>> <property name="timeBetweenEvictionRunsMillis" value="1800000" /> >>> <property name="numTestsPerEvictionRun" value="3" /> >>> <property name="minEvictableIdleTimeMillis" value="1800000" /> >>> <property name="validationQuery" value="SELECT 1" /> >>> <property name="maxActive" value="2"/> >>> <property name="logAbandoned" value="true"/> >>> <property name="removeAbandoned" value="true"/> >>> </bean> >> >> What happens if you set it to 1? Yes, I meant maxActive, sorry. Why use a DeferredResult here if you're just setting the result synchronously and inline anyway? You may as well just remove the key from the map manually. Am I missing something? p >>> Any idea what I am getting wrong? >>> >>> @Daniel, I have configured jmx with Spring and I get a numIdle of 0 and >>> numActive of 2 after the problem occurs. This confirms what you and Chuck >>> say: my app leaks db connections. >>> >>> However, I am still not sure why my app leaks the connections. I use the >>> default Spring configuration... >>> >>> Sorry: it is slightly offtopic now. I guess this is no longer a Tomcat >>> question so I should post it elsewhere. >>> >>> Julien. >>> >>> >>> 2013/3/22 Caldarale, Charles R <chuck.caldar...@unisys.com> >>> >>>>> From: Julien Martin [mailto:bal...@gmail.com] >>>>> Subject: Re: My use of Spring MVC's DeferredResult class causes Tomcat >>>> 7.0.35 to crash silently >>>> >>>>> "http-bio-8080-exec-10" daemon prio=10 tid=0x00007f68840a2800 >> nid=0x41b5 >>>> in >>>>> Object.wait() [0x00007f690cc57000] >>>>> java.lang.Thread.State: WAITING (on object monitor) >>>>> at java.lang.Object.wait(Native Method) >>>>> - waiting on <0x00000007e8fc4650> (a >>>>> org.apache.commons.pool.impl.GenericObjectPool$Latch) >>>>> at java.lang.Object.wait(Object.java:503) >>>>> at >>>> >> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1115) >>>>> - locked <0x00000007e8fc4650> (a >>>> org.apache.commons.pool.impl.GenericObjectPool$Latch) >>>>> at >>>> >> org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106) >>>> >>>> Looks like you're leaking database connections, likely by not returning >>>> them to the pool. Read Chris' article on how to do it right: >>>> >>>> >>>> >> http://blog.christopherschultz.net/index.php/2009/03/16/properly-handling-pooled-jdbc-connections/ >>>> >>>> - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>>> For additional commands, e-mail: users-h...@tomcat.apache.org >>>> >>>> >>> >> >> >> -- >> >> [key:62590808] >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > -- [key:62590808] --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org