Mailing List webobjects-dev@wocommunity.org Message #45
From: Maik Musall <webobjects-dev@wocommunity.org>
Subject: Re: [WO-DEV] Urgent Out of Memory help needed
Date: Tue, 9 Feb 2021 17:03:12 +0100
To: WebObjects & WOnder Development <webobjects-dev@wocommunity.org>
Signed Data (Text SHA256)
Hi Markus,

you upped the intance *to* 2GB? That’s still Raspberry Pi territory…

I suspect some Javascript that doesn’t hit the existing session and creates new ones on every request. I’d add logging stack traces for new sessions to see where they come from.

Maik

public static void logStackTrace( String message, int maxSteps ) {
StringBuilder sb = new StringBuilder();
if( message != null ) sb.append( message );
sb.append( " from\n" );
int m = 0;
final int logFrom = 1;
final int maxStackDepth = logFrom + maxSteps;
for( StackTraceElement stackElem : new Throwable().getStackTrace() ) {
if( m >= logFrom ) sb.append( stackElem.toString() ).append( "\n" );
if( ++m >= maxStackDepth ) break;
}
log.info( sb.toString() );
}


Am 08.02.2021 um 09:42 schrieb Markus Ruggiero (rucotec) <webobjects-dev@wocommunity.org>:

We are running the same application code in a handful of instances. Each instance is dedicated to one customer. There are only some very small differences between the instances like db credentials and some webserver resources (customer specific logo etc). One customer is driving their dedicated instance regularly into java memory exhaustion, all others have no problem. This particular customer is using one screen more than other customers do. This screen has a couple Ajax components, but as far as I can tell nothing too fancy. In WOMonitor we can see that the Running Session count at the bottom right of the details display goes up like crazy. Within hours the count can reach 1500+. I started to trace all Session creation (Thread.dumpStack() in Session constructor) but as expected there was exactly one session being created at login, then none more. 

What the heck is going on here? What does WOMonitor display here? Obviously must be something other than just session creation. Could this be an Ajax issue? Where would you start? We upped the JVM memory to 2G to survive the day and have more instances for that particular customer running.

Btw: how do you go into WOStatistics? Setting a statistics password in WOMonitor did not help, the direct action always comes back with a browser error (Safari can’t open the page bla bla bla). I seem the miss something here.

Thanks for any help
---markus---

Markus Ruggiero

rucotec GmbH                        web https://rucotec.ch
Steinenvorstadt 79                email markus.ruggiero@rucotec.ch
4051 Basel / Switzerland         mobile +41 79 508 4701









Content Unaltered as verified By:
Maik Musall <maik@selbstdenker.ag>
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster