Hi Cornelius,
Thank you for your answer.

It is usually only one instance which gets a traffic peak.

In the most recent case I could track it to a user trying to set a link to the app from another page/service, using the URL seen in the browser window, which did contain the instance number. Thus all requests coming from this link hit only one instance :-(.

I will try your code in the session creation process and just send myself an Email if the count becomes too high. Thus I can react fast and restart the affected instance if need be. The said link is changed and should not be a problem any longer but I had such behaviour of single instances before.

Maybe there is a deadlock after all involved as well. The instance run out of memory silently (no message back to Application, because this message would have been emailed to me) - and I got none.

Thanks for your help,

Ute


Am 22.11.2007 um 11:02 schrieb Cornelius Jaeger:

Hi Ute

Is it just one of many instances that get 2000+ sessions, or do all instances across the board get overloaded?
Are there too many users? i.e you need faster hardware.
Is there a component that is creating a session where you would not expect it? ERXConditional, WOForm, etc. Some components can actually cause two sessions to be created if wrongly configured. Are there v. long requests that might return a session timeout to the user without actually timing out the session?
Could there be a deadlock problem?

As to solving your problem you might be able to do something like this when your session init's or some more appropriate place:

int sessionCount = WOApplication.application().activeSessionsCount();
if (sessionCount > 100) {
        // do something here
}

i don't think there is a way to get a handle on all the sessions unless you save all the sessionID's created by an instance and then enumerate using the WOSessionStore to get all the sessions back. actually, that might not work either, checkOutSessionWithID requires a WORequest and probably has consequences, so you might need to subclass WOSessionStore and keep an array of your session objects, which is probably expensive.

hth

cornelius


On Nov 22, 2007, at 10:06 AM, ute Hoffmann wrote:

Hallo,
every once in a while I have the situation where a single instance has about 2000+ active sessions and thus becomes unresponsive.

The user sees "the request produced an error" page.

Question a) Is there a programmatic/javaMonitor way to check how many sessions are on a single instance and if sessioncount>x set this session to refuse new sessions till sessioncount<x?

Question b) Is there a way to make the instance aware of the situation and either let it see that it is dead (what it really is) -> thus restartig itself or sending a mail to an administrator saying: too many sessions (who then can act accordingly)?

I could schedule all instances, but I doubt it would solve this problem because the instance is unresponsive and it probably will not time out the sessions and thus never be restarted by the scheduler, right?

Any solutions for this?

Thanks a lot,

Ute
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-deploy mailing list (Webobjects- [EMAIL PROTECTED])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-deploy/cjaeger% 40visualfood.ch

This email sent to [EMAIL PROTECTED]



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-deploy mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-deploy/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to