• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: SOLVED: Zombie sessions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SOLVED: Zombie sessions


  • Subject: Re: SOLVED: Zombie sessions
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 23 Oct 2008 14:17:16 -0700


On Oct 23, 2008, at 12:09 AM, Simon McLean wrote:

Blimey, this has taken me weeks to figure out...

We've been plagued with zombie sessions for weeks on a couple of production apps. One, for example, is used by a team of 5 people who sign on in the morning and out in the evening, by which time the app is busy running 300+ sessions!

Anyway, after much digging I finally nailed it down to a component that was being used to render email. We use the following method to instantiate a component and then call generateResponse().contentString() to get it's html content:

public static WOComponent instantiatePage(String pageName) {
// Create a context from a fake request
WORequest request = new WORequest("GET", "", "HTTP/1.1", null, null, null);
WOContext context = WOApplication.application().createContextForRequest(request);
return WOApplication.application().pageWithName(pageName, context);
}


The problem was that one of the components used as an email touched the session. I believe because we are using a fake context this results in a new session being created. I'm not sure why those extra sessions don't just expire like normal ones ? But anyway, problem solved. I can sleep again.

They weren't created normally in the RR loop so sleep never got called on them. Like a watched pot never boiling, awake sessions never terminate. :-P


Chuck

Hi Chuck -

Is there any reason why a session would normally sit inactive but awake for a long period of time ?

I wonder if it's something that could / should be recognised and handled by WO ?


I am reluctant to do much of this sort of "automated detection of developer defects". I'd rather have WO be fast than full of checks for obscure developer errors. It might be a check to only perform if "Refuse New Sessions" is active.

Chuck

--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >SOLVED: Zombie sessions (From: Simon McLean <email@hidden>)
 >Re: SOLVED: Zombie sessions (From: Chuck Hill <email@hidden>)
 >Re: SOLVED: Zombie sessions (From: Simon McLean <email@hidden>)

  • Prev by Date: Wonder App doesn't receive "ApplicationDidFinishLaunchingNotification" notification when deployed as a servlet
  • Next by Date: Re: Wonder App doesn't receive "ApplicationDidFinishLaunchingNotification" notification when deployed as a servlet
  • Previous by thread: Re: SOLVED: Zombie sessions
  • Next by thread: Re: SOLVED: Zombie sessions
  • Index(es):
    • Date
    • Thread