users@glassfish.java.net

Re: How can web sessions leak?

From: Ryan de Laplante <ryan_at_ijws.com>
Date: Wed, 05 Nov 2008 18:09:10 -0500

There are probably over 100 connection pools of a JCA resource adapter
connecting out to different properties in the chain. That connector
manages threads but was written years ago and has proven to be stable
and not leak. My out of heap space errors first happened two weeks ago
today, then then today. GlassFish hasn't been upgraded since May
2008, and our app hasn't been touched since Sept 2008. Only Windows
updates get installed, but those were done days after the first heap
space error. Something is fishy.


Ryan

Stephen Connolly wrote:
> Just a thought,
>
> but does your app have any background threads?
>
> background threads are bad m-kay because they might be holding a
> reference to your session and preventing it from being GC'd.... which
> is one of the reasons why you are not supposed to start Threads in a
> JavaEE application.... of course everyone does it ;-)
>
> So, I guess, a good IDE could let you search for any useage of Thread
> or Runnable....
>
> Things get more messy as the great java.util.concurrency classes get
> more widespread usage...
>
> Anywho, the use of Threads, per se, is not bad.... provided you keep
> hold of the context that the thread belongs to, and providing you
> expire and expunge objects when that context becomes invalidated.
>
> -Stephen
>
> 2008/11/5 Ryan de Laplante <ryan_at_ijws.com <mailto:ryan_at_ijws.com>>
>
>
>
> Ryan, we're down to 9.1 UR2 patch 4 (see
> http://blogs.sun.com/GlassFishForBusiness/entry/sjs_as_9_1_u23).
> Maybe some of these issues are fixed already (sorry I haven't
> checked).
> -Alexis
>
>
> Thank you. I am aware of these patch releases and reviewed the
> list of changes again today and didn't see anything that resembled
> the problem I am having. Upgrading is not a simple task for us
> because it involves a complete re-install and sometimes up to 4
> hours of configuration. We've tried the upgrade feature in the
> setup and found that it corrupted our domain.xml and the server
> wouldn't start.
>
> I could create a patch based on SJSAS 9.1 UR2 and have you
> try to reproduce the issue.
>
> Let me know if that would work for you.
>
> Thanks,
> Jan
>
>
> Thanks, I'll let you know if we require that. I imagine the
> proper way to go about this would be to open a support incident so
> that it can be tracked.
>
>
> I managed to get the NetBeans Profiler working and took snapshots
> before the transaction, after the transaction, then after 10
> minutes when the session is configured to expire. I don't really
> understand what I'm looking at because it looks like the session
> objects might still be there. Is there a better way to diagnose
> this? System.out.println? :)
>
>
>
> Thanks,
> Ryan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> <mailto:users-unsubscribe_at_glassfish.dev.java.net>
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
> <mailto:users-help_at_glassfish.dev.java.net>
>
>