Re: Scheduled WOApps not scheduled, Barbarian Solution
Re: Scheduled WOApps not scheduled, Barbarian Solution
- Subject: Re: Scheduled WOApps not scheduled, Barbarian Solution
- From: "Jerry W. Walker" <email@hidden>
- Date: Fri, 28 Apr 2006 08:22:38 -0400
Hi, Wolfram,
On Apr 28, 2006, at 3:55 AM, Wolfram Stebel wrote:
Thanks Chuck and Jerry,
as you wrote (but how could you know? :-) ), there have been a lot
open
sessions in each of the instances.
There has been another "infect" in my application, it always
returned to the
previous page on a browser refresh...
The Barbarian solution: I simply restarted the server and
everything seems
to be fine again, also the refresh problem.
But...
You can't do this too often on a production server :-)
If you go into JavaMonitor and press the Config button for your app,
click on the reveal triangle left of the Scheduling section, you'll
see a column in the parameters table labeled "Graceful Scheduling".
With the check box checked, the app will not restart until the number
of active sessions has gone below the "Minimum Active Sessions"
parameter set for each instance.
You can either set the "Minimum Active Sessions" to some large
number, or simply uncheck the Graceful Scheduling check box and when
it's time to restart the app, it will simply terminate the sessions
and restart.
Is there a simple way to monitor the sessions without coding tons
of lines?
Is there a default set of information one should log in it's
application, in
addition to the logs of the application logic?
I haven't debugged a hanging session in quite a while, but the first
places I would look for logging are at the three notifications:
* SessionDidCreateNotification
* SessionDidRestoreNotification
* SessionDidTimeOutNotification
and possible overrides for the WOSession methods:
* awake()
* sleep()
* terminate()
As WO development is fairly documented (with Practical
WebObjects :-) ),
deployment and maintenance of WO applications is not. Shure, most
of us are
developers... :-) but shouldn't the applications run somewhere for
profit
too?
Is it worth another book from Chuck and Sacha?
Have you checked the WebObjects Deployment Guide from Apple?
http://developer.apple.com/documentation/WebObjects/Deployment/
Deploying_Applications/index.html
Regards,
Jerry
Am 27.04.2006 19:05 Uhr schrieb "Chuck Hill" unter
<email@hidden>:
On Apr 27, 2006, at 12:37 AM, Wolfram Stebel wrote:
Hi List,
i have a WOApp running in 7 instances. Each night i scheduled one
of them to
restart at 3AM.
When i come to the server in the morning, one instance (the
scheduled one)
shows "refuse new session=ON" but there is no new log for the
instance
showing up after restart.
So i suspect that the restart failes, only the refuse is set and
nothing
more.
I think you are probably mis-interpreting what is happening. The
application will not restart until all of the sessions have
terminated (unless you have configured it to restart when there are
some number of remaining sessions). What are you describing is what
happens when sessions get hung / deadlocked. Sessions in this state
are never checked back in and so never terminate. As the sessions
don't terminate, neither does the app. It just sits there in
shutdown mode waiting for the sessions to terminate and they never
will. So the problem is not that your app is not restarting, but
that it is not actually stopping!
I would suggest getting a thread dump from the application when it
is in this state, that should diagnose the problem. In your code,
the first thing to ensure is that the constructor, awake, sleep, and
terminate methods of session can't throw an exception ever.
Chuck
Regards and Thanks
Wolfram
--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial
Strength Internet Enabled Systems
email@hidden
203 278-4085 office
_______________________________________________
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