• 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: Temporarily Refusing New Sessions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Temporarily Refusing New Sessions


  • Subject: Re: Temporarily Refusing New Sessions
  • From: email@hidden
  • Date: Fri, 5 Nov 2004 10:27:06 -0800

Chuck,

Thanks for the input. What you suggest is actually what I currently have
implemented. I have one instance that behaves as a "master"--It takes the task,
slits it into sub-tasks, and then writes them to the DB. The other instances
watch the DB and process the sub-tasks as they become available. It works quite
well. :) The tasks are processed in a separate thread, and the only effect on
user sessions is a slight performance decrease. I was just curious to know if
there was a way to refuse _new_ sessions on instances processing a task.
However, as I chew on this more, I think it is less of an issue. And as you
suggested, creating a separate application/daemon to do the processing would
bea good alternative if it does become a problem.

Thanks again,

Ian


Quoting Chuck Hill <email@hidden>:

> Hi Ian,
>
> On Nov 5, 2004, at 9:04 AM, email@hidden wrote:
>
> > I'm looking for a way to temporarily refuse sessions on an instance
> > while it
> > performs a CPU intensive task.
> I'm not clear on what you are after.  Do you want to refuse new
> sessions (while continuing to process the ones that  have been
> created), or do you want to refuse all _requests_?  What problems are
> you having when this CPU intensive tasks is executing?  Unless your app
> is only using sessionless direct actions, you can't refuse all requests
> as no other instance has the session to handle a session based request.
>   You can queue them up, but the frameworks already do that, so it seems
> that is not a solution acceptable to you.
>
> > It doesn't look like
> > WOApplication.refuseNewSessions() will work, since that will cause the
> > application to terminate if the number of sessions falls below
> > MinimumActiveSessions (currently set to 0). Is there a way to have an
> > instance
> > refuse new sessions without terminating?
> Rather than fixating on this solution, which to be honest does not look
> like it is going to be a fruitful path,  why not return to the problem
> and see other solutions? You have a CPU intensive task.  Is it causing
> other users to get error messages when it is running?  Is it running
> too slowly?  The former is best solved by spinning off a thread and
> running the CPU intensive task in the background.  The latter is
> possibly best addressed by wrapping the information needed to run the
> task in an object and saving to the database.  Then have another
> application, like daemon, then watches the database for these tasks and
> runs them.  You can add an e-mail notification at the end of the task
> if they are being done for a user.
>
> Chuck
>
>
> --
> Practical WebObjects - a book for intermediate WebObjects developers
> who want to increase their overall knowledge of WebObjects, or those
> who are trying to solve specific application development problems.
> http://www.global-village.net/products/practical_webobjects
>
>
>
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

 _______________________________________________
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: 
 >Temporarily Refusing New Sessions (From: email@hidden)
 >Re: Temporarily Refusing New Sessions (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: EOF problems
  • Next by Date: EOF problems
  • Previous by thread: Re: Temporarily Refusing New Sessions
  • Next by thread: Re: EOF problems
  • Index(es):
    • Date
    • Thread