Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Daniel Mikusa
On Mar 22, 2013, at 10:42 AM, 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:
> 
>  destroy-method="close" id="dataSource">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 

You might try adding in "removeAbandonedTimeout" and setting it really low.  It 
defaults to 300 seconds.

Dan


> 
> 
> 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 
> 
>>> 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=0x7f68840a2800 nid=0x41b5
>> in
>>> Object.wait() [0x7f690cc57000]
>>>   java.lang.Thread.State: WAITING (on object monitor)
>>> at java.lang.Object.wait(Native Method)
>>> - waiting on <0x0007e8fc4650> (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 <0x0007e8fc4650> (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
>> 
>> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Pid
On 22/03/2013 15:08, Julien Martin wrote:
> You're right. I should set the result in another method/thread i.e. a post
> method...
> Is this related to the memory leaks?

It might be worth simplifying the method while you debug the connection
leak issue.


p


> J.
> 
> 2013/3/22 Pid 
> 
>> On 22/03/2013 14:56, Julien Martin wrote:
>>> Hi,
>>> You mean if I set maxActive to 1?
>>
>>
>>> J.
>>>
>>> 2013/3/22 Pid 
>>>
>>>> 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:
>>>>>
>>>>> >>>> destroy-method="close" id="dataSource">
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>
>>>> 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 
>>>>>
>>>>>>> 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=0x7f68840a2800
>>>> nid=0x41b5
>>>>>> in
>>>>>>> Object.wait() [0x7f690cc57000]
>>>>>>>java.lang.Thread.State: WAITING (on object monitor)
>>>>>>> at java.lang.Object.wait(Native Method)
>>>>>>> - waiting on <0x0007e8fc4650> (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 <0x0007e8fc4650> (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
>>
>>
> 


-- 

[key:62590808]

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Julien Martin
You're right. I should set the result in another method/thread i.e. a post
method...
Is this related to the memory leaks?
J.

2013/3/22 Pid 

> On 22/03/2013 14:56, Julien Martin wrote:
> > Hi,
> > You mean if I set maxActive to 1?
>
>
> > J.
> >
> > 2013/3/22 Pid 
> >
> >> 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:
> >>>
> >>>  >>> destroy-method="close" id="dataSource">
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>
> >> 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 
> >>>
> >>>>> 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=0x7f68840a2800
> >> nid=0x41b5
> >>>> in
> >>>>> Object.wait() [0x7f690cc57000]
> >>>>>java.lang.Thread.State: WAITING (on object monitor)
> >>>>> at java.lang.Object.wait(Native Method)
> >>>>> - waiting on <0x0007e8fc4650> (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 <0x0007e8fc4650> (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
>
>


Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Pid
On 22/03/2013 14:56, Julien Martin wrote:
> Hi,
> You mean if I set maxActive to 1?


> J.
> 
> 2013/3/22 Pid 
> 
>> 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:
>>>
>>> >> destroy-method="close" id="dataSource">
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>
>> 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 
>>>
>>>>> 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=0x7f68840a2800
>> nid=0x41b5
>>>> in
>>>>> Object.wait() [0x7f690cc57000]
>>>>>java.lang.Thread.State: WAITING (on object monitor)
>>>>> at java.lang.Object.wait(Native Method)
>>>>> - waiting on <0x0007e8fc4650> (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 <0x0007e8fc4650> (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



Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Julien Martin
Hi,
You mean if I set maxActive to 1?
J.

2013/3/22 Pid 

> 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:
> >
> >  > destroy-method="close" id="dataSource">
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
>
> What happens if you set it to 1?
>
>
> 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 
> >
> >>> 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=0x7f68840a2800
> nid=0x41b5
> >> in
> >>> Object.wait() [0x7f690cc57000]
> >>>java.lang.Thread.State: WAITING (on object monitor)
> >>> at java.lang.Object.wait(Native Method)
> >>> - waiting on <0x0007e8fc4650> (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 <0x0007e8fc4650> (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
>
>


Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Pid
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:
> 
>  destroy-method="close" id="dataSource">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 

What happens if you set it to 1?


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 
> 
>>> 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=0x7f68840a2800 nid=0x41b5
>> in
>>> Object.wait() [0x7f690cc57000]
>>>java.lang.Thread.State: WAITING (on object monitor)
>>> at java.lang.Object.wait(Native Method)
>>> - waiting on <0x0007e8fc4650> (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 <0x0007e8fc4650> (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



Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Julien Martin
@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:


















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 

> > 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=0x7f68840a2800 nid=0x41b5
> in
> > Object.wait() [0x7f690cc57000]
> >java.lang.Thread.State: WAITING (on object monitor)
> > at java.lang.Object.wait(Native Method)
> > - waiting on <0x0007e8fc4650> (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 <0x0007e8fc4650> (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
>
>


RE: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Caldarale, Charles R
> 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=0x7f68840a2800 nid=0x41b5 in
> Object.wait() [0x7f690cc57000]
>java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <0x0007e8fc4650> (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 <0x0007e8fc4650> (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



Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Daniel Mikusa
n prio=10
> tid=0x7f691875c800 nid=0x41a5 waiting on condition [0x7f690e3dc000]
>   java.lang.Thread.State: TIMED_WAITING (sleeping)
> at java.lang.Thread.sleep(Native Method)
> at
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1508)
> at java.lang.Thread.run(Thread.java:722)
> 
>   Locked ownable synchronizers:
> - None
> 
> "Timer-0" daemon prio=10 tid=0x7f68c4a93800 nid=0x41a4 in Object.wait()
> [0x7f690da5e000]
>   java.lang.Thread.State: TIMED_WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <0x0007f7abdda0> (a java.util.TaskQueue)
> at java.util.TimerThread.mainLoop(Timer.java:552)
> - locked <0x0007f7abdda0> (a java.util.TaskQueue)
> at java.util.TimerThread.run(Timer.java:505)
> 
>   Locked ownable synchronizers:
> - None
> 
> "GC Daemon" daemon prio=10 tid=0x7f691866b000 nid=0x419e in
> Object.wait() [0x7f690eb3c000]
>   java.lang.Thread.State: TIMED_WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <0x0007836c8508> (a sun.misc.GC$LatencyLock)
> at sun.misc.GC$Daemon.run(GC.java:117)
> - locked <0x0007836c8508> (a sun.misc.GC$LatencyLock)
> 
>   Locked ownable synchronizers:
> - None
> 
> "Service Thread" daemon prio=10 tid=0x7f69180f0800 nid=0x419b runnable
> [0x]
>   java.lang.Thread.State: RUNNABLE
> 
>   Locked ownable synchronizers:
> - None
> 
> "C2 CompilerThread1" daemon prio=10 tid=0x7f69180ee800 nid=0x419a
> waiting on condition [0x]
>   java.lang.Thread.State: RUNNABLE
> 
>   Locked ownable synchronizers:
> - None
> 
> "C2 CompilerThread0" daemon prio=10 tid=0x7f69180eb800 nid=0x4199
> waiting on condition [0x]
>   java.lang.Thread.State: RUNNABLE
> 
>   Locked ownable synchronizers:
> - None
> 
> "Signal Dispatcher" daemon prio=10 tid=0x7f69180e9000 nid=0x4198
> runnable [0x]
>   java.lang.Thread.State: RUNNABLE
> 
>   Locked ownable synchronizers:
> - None
> 
> "Finalizer" daemon prio=10 tid=0x7f691809c000 nid=0x4197 in
> Object.wait() [0x7f690fefd000]
>   java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <0x000785b731f8> (a java.lang.ref.ReferenceQueue$Lock)
> at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
> - locked <0x000785b731f8> (a java.lang.ref.ReferenceQueue$Lock)
> at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
> at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:177)
> 
>   Locked ownable synchronizers:
> - None
> 
> "Reference Handler" daemon prio=10 tid=0x7f691809a000 nid=0x4196 in
> Object.wait() [0x7f690fffe000]
>   java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <0x000785b72da8> (a java.lang.ref.Reference$Lock)
> at java.lang.Object.wait(Object.java:503)
> at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)
> - locked <0x000785b72da8> (a java.lang.ref.Reference$Lock)
> 
>   Locked ownable synchronizers:
> - None
> 
> "main" prio=10 tid=0x7f6918009000 nid=0x4190 runnable
> [0x7f6920b89000]
>   java.lang.Thread.State: RUNNABLE
> at java.net.PlainSocketImpl.socketAccept(Native Method)
> at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:398)
> at java.net.ServerSocket.implAccept(ServerSocket.java:522)
> at java.net.ServerSocket.accept(ServerSocket.java:490)
> at org.apache.catalina.core.StandardServer.await(StandardServer.java:452)
> at org.apache.catalina.startup.Catalina.await(Catalina.java:766)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:712)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456)
> 
>   Locked ownable synchronizers:
> - None
> 
> "VM Thread" prio=10 tid=0x7f6918092800 nid=0x4195 runnable
> 
> "GC task thread#0 (ParallelGC)" prio=10 tid=0x7f6918017000 nid=0x4191
> runnable
> 
> "GC task thread#1 (ParallelGC)" prio=10 tid=0x7f6918019000 nid=0x4192
> runnable
> 
> "GC task thread#2 (ParallelGC)" prio=10 tid=0x7f691801a800 nid=0x4193
> runnable
> 
> "GC task thread#3 (ParallelGC)" prio=10 tid=0x7f691801c800 nid=0x4194
> runnable
> 
> "VM Periodic Task Thread" prio=10 tid=0x7f69180fb000 nid=0x419c waiting
> on condition
> 
> JNI global references: 439
> 
> 
> 2013/3/21 Caldarale, Charles R 
> 
>>> 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
>> 
>>> The 9th method invocation causes Tomcat to hang. When you issue
>>> requests after that, they also "hang".
>> 
>> That's quite different from a crash.  Can you take a thread dump and a
>> heap dump?  Using VisualVM or some of the command-line tools, you can
>> monitor the JVM and see if anything odd is going on from that perspective.
>> 
>> http://wiki.apache.org/tomcat/FAQ/Troubleshooting_and_Diagnostics
>> 
>> You may have deadlocked threads, you may be out of heap space, you may
>> have locked up waiting for a database connection, etc.  The diagnostic
>> tools should help you figure it out.
>> 
>> - 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
>> 
>> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Julien Martin
ting on <0x000785b72da8> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:503)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)
- locked <0x000785b72da8> (a java.lang.ref.Reference$Lock)

   Locked ownable synchronizers:
- None

"main" prio=10 tid=0x7f6918009000 nid=0x4190 runnable
[0x7f6920b89000]
   java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:398)
at java.net.ServerSocket.implAccept(ServerSocket.java:522)
at java.net.ServerSocket.accept(ServerSocket.java:490)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:452)
at org.apache.catalina.startup.Catalina.await(Catalina.java:766)
at org.apache.catalina.startup.Catalina.start(Catalina.java:712)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456)

   Locked ownable synchronizers:
- None

"VM Thread" prio=10 tid=0x7f6918092800 nid=0x4195 runnable

"GC task thread#0 (ParallelGC)" prio=10 tid=0x7f6918017000 nid=0x4191
runnable

"GC task thread#1 (ParallelGC)" prio=10 tid=0x7f6918019000 nid=0x4192
runnable

"GC task thread#2 (ParallelGC)" prio=10 tid=0x00007f691801a800 nid=0x4193
runnable

"GC task thread#3 (ParallelGC)" prio=10 tid=0x7f691801c800 nid=0x4194
runnable

"VM Periodic Task Thread" prio=10 tid=0x7f69180fb000 nid=0x419c waiting
on condition

JNI global references: 439


2013/3/21 Caldarale, Charles R 

> > 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
>
> > The 9th method invocation causes Tomcat to hang. When you issue
> > requests after that, they also "hang".
>
> That's quite different from a crash.  Can you take a thread dump and a
> heap dump?  Using VisualVM or some of the command-line tools, you can
> monitor the JVM and see if anything odd is going on from that perspective.
>
> http://wiki.apache.org/tomcat/FAQ/Troubleshooting_and_Diagnostics
>
> You may have deadlocked threads, you may be out of heap space, you may
> have locked up waiting for a database connection, etc.  The diagnostic
> tools should help you figure it out.
>
>  - 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
>
>


RE: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-21 Thread Caldarale, Charles R
> 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

> The 9th method invocation causes Tomcat to hang. When you issue
> requests after that, they also "hang".

That's quite different from a crash.  Can you take a thread dump and a heap 
dump?  Using VisualVM or some of the command-line tools, you can monitor the 
JVM and see if anything odd is going on from that perspective.

http://wiki.apache.org/tomcat/FAQ/Troubleshooting_and_Diagnostics

You may have deadlocked threads, you may be out of heap space, you may have 
locked up waiting for a database connection, etc.  The diagnostic tools should 
help you figure it out.

 - 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



Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-21 Thread Julien Martin
Chuck and Daniel,

Thanks for replying. I'll try and provide the information requested.

   - The 9th method invocation causes Tomcat to hang. When you issue
   requests after that, they also "hang".
   - Here is the connector info:

 

 


   - Jvm version:

java version "1.7.0_15"
Java(TM) SE Runtime Environment (build 1.7.0_15-b03)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)


   - My app is 1.6 compatible.
   - Platform type and version: Ubuntu 12.10


   - APR: I just connect to tomcat through port 8080

Please don't hesitate to tell me if the information provided is not
sufficient.

Regards,

Julien.


2013/3/21 Caldarale, Charles R 

> > From: Daniel Mikusa [mailto:dmik...@vmware.com]
> > Subject: Re: My use of Spring MVC's DeferredResult class causes Tomcat
> 7.0.35 to crash silently
>
> > Can you define "crash" a little better?  Is the Tomcat process still
> > running?  If so, is it answering any requests?  If so, what happens
> > if you send a request to this resource?  Do you get a 4xx / 5xx error?
> > Does it hang?
>
> > Also, what does your  look like?
>
> And provide the bare minimum of environmental information:
>
> exact JVM version
> platform type and version
> using APR or not
>
>  - 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
>
>


RE: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-21 Thread Caldarale, Charles R
> From: Daniel Mikusa [mailto:dmik...@vmware.com] 
> Subject: Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 
> to crash silently

> Can you define "crash" a little better?  Is the Tomcat process still 
> running?  If so, is it answering any requests?  If so, what happens 
> if you send a request to this resource?  Do you get a 4xx / 5xx error?
> Does it hang?

> Also, what does your  look like?

And provide the bare minimum of environmental information:

exact JVM version
platform type and version
using APR or not

 - 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



Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-21 Thread Daniel Mikusa
On Mar 21, 2013, at 4:46 PM, Julien Martin wrote:

> Hello,
> 
> I have the following Spring MVC 3.2 code (it uses the DeferredResult
> class
> ):
> 
> @RequestMapping(value = "getMessages", method = RequestMethod.GET,
> produces = "application/json")
>@ResponseBody
>public DeferredResult> getMessages(@RequestParam
> final Long senderId) {
>final Long recipientId = memberService.retrieveCurrentMember().getId();
>final String messageRequestKey = new
> StringBuilder().append(senderId).append(":").append(recipientId).toString();
>final DeferredResult> deferredResult = new
> DeferredResult>(null, Collections.emptyList());
>messageRequests.put(messageRequestKey, deferredResult);
> 
>deferredResult.onCompletion(new Runnable() {
>@Override
>public void run() {
>messageRequests.remove(messageRequestKey);
>}
>});
> 
>List unReadMessages =
> messageService.findUnreadMessages(senderId, recipientId);
>if (!unReadMessages.isEmpty()) {
>deferredResult.setResult(unReadMessages);
>}
>return deferredResult;
>}
> 
> This method is polled continuously by an ajax call and it
> systematically *causes
> Tomcat to crash upon the 9th method invocation*. Note that Tomcat crashes
> without any error message.

Can you define "crash" a little better?  Is the Tomcat process still running?  
If so, is it answering any requests?  If so, what happens if you send a request 
to this resource?  Do you get a 4xx / 5xx error?  Does it hang?

Also, what does your  look like?

Dan

> 
> *I would be very grateful if someone could help me determine the reason why
> this code exhibits this behavior, perhaps by giving me tips on how to debug
> the app/tomcat.*
> 
> Regards,
> 
> Julien.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org