You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@river.apache.org by Zsolt Kúti <ku...@prolan.hu> on 2012/04/21 11:01:36 UTC

River cleanup problems in Tomcat

Hello,

When my webapp is undeployed Tomcat reports several threads that failed
to stop and leaks memory:
[multicast discovery response listener]
[multicast discovery request] etc.
During development redeployment is frequent causing problem sooner or
later.

These threads come from LookupDiscovery passed to
ServiceDiscoveryManager instance. 
Care is taken to call SDM.terminate() in servlet's destroy().


Any advice on what is the suggested practice to use River in such
environment is appreciated.

Thanks
Zsolt

Re: River cleanup problems in Tomcat

Posted by Zsolt Kúti <ku...@prolan.hu>.
Sun, 22 Apr 2012 16:04:42 -0400 -n
Greg Trasuk <tr...@stratuscom.com> írta:

> > Greg Trasuk <tr...@stratuscom.com> wrote:
...
> Is the ServiceDiscoveryManager creating its own discovery manager
> through the configuration, or are you passing in an LDM through the
> constructor?  ServiceDiscoveryManager will only terminate the
> DiscoveryManager if it was created by the SDM, and not passed in
> through the constructor.

Yes, you're right. It was passed that way. I superficially read the
code.
The problem has now gone.

Thanks!
Zsolt

Re: River cleanup problems in Tomcat

Posted by Greg Trasuk <tr...@stratuscom.com>.
On Sun, 2012-04-22 at 05:38, Zsolt Kúti wrote:
> On Sun, 22 Apr 2012 05:15:12 -0400
> Greg Trasuk <tr...@stratuscom.com> wrote:
> 
> > 
> > 
> > You'd also need to make sure that you're calling terminate on the
> > lookupDiscoveryManager that was passed in.  If you are, then I'd check
> > to see if Tomcat is right about the threads being kept around.  It
> > might be that they just take a few seconds to terminate.
> SDM.terminate() calls LD.terminate().

Is the ServiceDiscoveryManager creating its own discovery manager
through the configuration, or are you passing in an LDM through the
constructor?  ServiceDiscoveryManager will only terminate the
DiscoveryManager if it was created by the SDM, and not passed in through
the constructor.

Cheers,

Greg.

> PermGen error does appear after some redeploys. Since TC reports
> similar for other sources (although to lesser extent) I'll try to
> separate them first.
> 
> Thanks!
> Zsolt
> 
> > 
> > Greg.
> > On Sat, 2012-04-21 at 05:01, Zsolt Kúti wrote:
> > > Hello,
> > > 
> > > When my webapp is undeployed Tomcat reports several threads that
> > > failed to stop and leaks memory:
> > > [multicast discovery response listener]
> > > [multicast discovery request] etc.
> > > During development redeployment is frequent causing problem sooner
> > > or later.
> > > 
> > > These threads come from LookupDiscovery passed to
> > > ServiceDiscoveryManager instance. 
> > > Care is taken to call SDM.terminate() in servlet's destroy().
> > > 
> > > 
> > > Any advice on what is the suggested practice to use River in such
> > > environment is appreciated.
> > > 
> > > Thanks
> > > Zsolt
> > 


Re: River cleanup problems in Tomcat

Posted by Zsolt Kúti <la...@gmail.com>.
On Sun, 22 Apr 2012 05:15:12 -0400
Greg Trasuk <tr...@stratuscom.com> wrote:

> 
> 
> You'd also need to make sure that you're calling terminate on the
> lookupDiscoveryManager that was passed in.  If you are, then I'd check
> to see if Tomcat is right about the threads being kept around.  It
> might be that they just take a few seconds to terminate.
SDM.terminate() calls LD.terminate().
PermGen error does appear after some redeploys. Since TC reports
similar for other sources (although to lesser extent) I'll try to
separate them first.

Thanks!
Zsolt

> 
> Greg.
> On Sat, 2012-04-21 at 05:01, Zsolt Kúti wrote:
> > Hello,
> > 
> > When my webapp is undeployed Tomcat reports several threads that
> > failed to stop and leaks memory:
> > [multicast discovery response listener]
> > [multicast discovery request] etc.
> > During development redeployment is frequent causing problem sooner
> > or later.
> > 
> > These threads come from LookupDiscovery passed to
> > ServiceDiscoveryManager instance. 
> > Care is taken to call SDM.terminate() in servlet's destroy().
> > 
> > 
> > Any advice on what is the suggested practice to use River in such
> > environment is appreciated.
> > 
> > Thanks
> > Zsolt
> 

Re: River cleanup problems in Tomcat

Posted by Greg Trasuk <tr...@stratuscom.com>.

You'd also need to make sure that you're calling terminate on the
lookupDiscoveryManager that was passed in.  If you are, then I'd check
to see if Tomcat is right about the threads being kept around.  It might
be that they just take a few seconds to terminate.

Cheers,

Greg.
On Sat, 2012-04-21 at 05:01, Zsolt Kúti wrote:
> Hello,
> 
> When my webapp is undeployed Tomcat reports several threads that failed
> to stop and leaks memory:
> [multicast discovery response listener]
> [multicast discovery request] etc.
> During development redeployment is frequent causing problem sooner or
> later.
> 
> These threads come from LookupDiscovery passed to
> ServiceDiscoveryManager instance. 
> Care is taken to call SDM.terminate() in servlet's destroy().
> 
> 
> Any advice on what is the suggested practice to use River in such
> environment is appreciated.
> 
> Thanks
> Zsolt