Re: Recovery from OutOfMemoryError?

2007-08-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Recovery from OutOfMemoryError? (Sorry for not responding sooner. Went out to dinner and to see the Spider Pig movie :-) Nice. ;) Actually

Re: Recovery from OutOfMemoryError?

2007-08-01 Thread Andrew Miehs
On 01/08/2007, at 3:44 PM, Christopher Schultz wrote: I'm guessing he's running a webapp, and that one of the request worker threads got an OOME. Most webapp requests are idempotent (or should be), and those that aren't are generally wrapped around database or other transactions. Assuming

RE: Recovery from OutOfMemoryError?

2007-08-01 Thread Caldarale, Charles R
From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Recovery from OutOfMemoryError? I generally think of this as failure return as simply allowing the exception to propagate. That can work, but since OOMEs don't require throws declarations on methods, it's usually better

Re: Recovery from OutOfMemoryError?

2007-08-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Recovery from OutOfMemoryError? Are you suggesting that all methods should be written as a loops around attempts to do real work, catching OOME

RE: Recovery from OutOfMemoryError?

2007-08-01 Thread Caldarale, Charles R
From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Recovery from OutOfMemoryError? (Sorry for not responding sooner. Went out to dinner and to see the Spider Pig movie :-) Nice. ;) The pig completely disappeared half way through the movie, but there are rumors

Re: Recovery from OutOfMemoryError?

2007-08-01 Thread Mark H. Wood
Would you (or anyone) care to provide a link to where I can learn more about swatch? Everything I've turned up so far points to a wanna-be replacement for UTC called internet time promoted by a watchmaker. -- Mark H. Wood, Lead System Programmer [EMAIL PROTECTED] Typically when a software

Re: Recovery from OutOfMemoryError?

2007-08-01 Thread Andrew Miehs
On 01/08/2007, at 6:50 PM, Mark H. Wood wrote: Would you (or anyone) care to provide a link to where I can learn more about swatch? Everything I've turned up so far points to a wanna-be replacement for UTC called internet time promoted by a watchmaker. http://swatch.sourceforge.net/

Re: Recovery from OutOfMemoryError?

2007-07-31 Thread Leon Rosenberg
variant 1: a log watcher that checks for OOMe and restarts tomcat variant 2: fix the bug :-) regards Leon On 7/31/07, Craig Berry [EMAIL PROTECTED] wrote: Our Tomcat-based app suffers from occasional OutOfMemoryErrors. We have found that we need to manually restart Tomcat when these happen;

RE: Recovery from OutOfMemoryError?

2007-07-31 Thread Craig Berry
for this. -Original Message- From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 31, 2007 9:46 AM To: Tomcat Users List Subject: Re: Recovery from OutOfMemoryError? variant 1: a log watcher that checks for OOMe and restarts tomcat variant 2: fix the bug :-) regards Leon On 7/31

Re: Recovery from OutOfMemoryError?

2007-07-31 Thread hanasaki
1. you may have a memory leak in your code... do some profiling 2. check out abandoned sessions that are due to expire perhaps you can lower the session timeout and that will make some memory available earlier. Craig Berry wrote: Our Tomcat-based app suffers from occasional OutOfMemoryErrors.

RE: Recovery from OutOfMemoryError?

2007-07-31 Thread Caldarale, Charles R
From: Craig Berry [mailto:[EMAIL PROTECTED] Subject: RE: Recovery from OutOfMemoryError? Fixing the bug would be cool, but the bug is actually just too many users contending for the same heap space Let's put it another way: your webapp and/or JVM configuration aren't set up properly

Re: Recovery from OutOfMemoryError?

2007-07-31 Thread Andrew Miehs
On 31/07/2007, at 6:52 PM, Craig Berry wrote: Fixing the bug would be cool, but the bug is actually just too many users contending for the same heap space, so that's going to be tough. I'd thought of the log watcher, but that seems a rather blunt instrument; I was thinking there might be some

RE: Recovery from OutOfMemoryError?

2007-07-31 Thread Craig Berry
technique to automate the restart would help a lot. -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 31, 2007 10:00 AM To: Tomcat Users List Subject: RE: Recovery from OutOfMemoryError? From: Craig Berry [mailto:[EMAIL PROTECTED] Subject: RE

RE: Recovery from OutOfMemoryError?

2007-07-31 Thread Craig Berry
To: Tomcat Users List Subject: Re: Recovery from OutOfMemoryError? On 31/07/2007, at 6:52 PM, Craig Berry wrote: Fixing the bug would be cool, but the bug is actually just too many users contending for the same heap space, so that's going to be tough. I'd thought of the log watcher

RE: Recovery from OutOfMemoryError?

2007-07-31 Thread Caldarale, Charles R
From: Craig Berry [mailto:[EMAIL PROTECTED] Subject: RE: Recovery from OutOfMemoryError? It depends on what the user chooses to do during the session. Again, try another point of view. It's what the webapps choose to do in response to user requests that provoke the problem. Is there some

Re: Recovery from OutOfMemoryError?

2007-07-31 Thread Rainer Jung
hi Craig, if you get OutOfMemoryError reliably in your log, you might consider the tanukisoftware Java Service Wrapper as an intermediate solution. It can watch the output and automatically restart Tomcat. I would not combine it with an app, that has a very high volume of log output though.

Re: Recovery from OutOfMemoryError?

2007-07-31 Thread Andrew Miehs
On 31/07/2007, at 7:19 PM, Caldarale, Charles R wrote: From: Craig Berry [mailto:[EMAIL PROTECTED] Subject: RE: Recovery from OutOfMemoryError? It depends on what the user chooses to do during the session. Again, try another point of view. It's what the webapps choose to do in response

RE: Recovery from OutOfMemoryError?

2007-07-31 Thread Marco
Dear Craig, You are familiar with, even with enough systemmemory, JVM uses limited memory? I your application consumes much memory, you could change settings in the tomcat6.conf file: #JAVA_OPTS=-Xminf0.1 -Xmaxf0.3 JAVA_OPTS=-Xmx1024M -Xms512M Or higher, depending on your systemconfiguration.

Re: Recovery from OutOfMemoryError?

2007-07-31 Thread Andrew Miehs
On 31/07/2007, at 7:39 PM, Marco wrote: Dear Craig, You are familiar with, even with enough systemmemory, JVM uses limited memory? I your application consumes much memory, you could change settings in the tomcat6.conf file: #JAVA_OPTS=-Xminf0.1 -Xmaxf0.3 JAVA_OPTS=-Xmx1024M -Xms512M mx

RE: Recovery from OutOfMemoryError?

2007-07-31 Thread Craig Berry
31, 2007 10:40 AM To: 'Tomcat Users List' Subject: RE: Recovery from OutOfMemoryError? Dear Craig, You are familiar with, even with enough systemmemory, JVM uses limited memory? I your application consumes much memory, you could change settings in the tomcat6.conf file: #JAVA_OPTS=-Xminf0.1

Re: Recovery from OutOfMemoryError?

2007-07-31 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Craig, Craig Berry wrote: Fixing the bug would be cool, but the bug is actually just too many users contending for the same heap space, so that's going to be tough. Too many users logged-in, or too many simultaneous connections? If the latter, you

Re: Recovery from OutOfMemoryError?

2007-07-31 Thread Len Popp
Message- From: Andrew Miehs [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 31, 2007 10:01 AM To: Tomcat Users List Subject: Re: Recovery from OutOfMemoryError? On 31/07/2007, at 6:52 PM, Craig Berry wrote: Fixing the bug would be cool, but the bug is actually just too many users contending

RE: Recovery from OutOfMemoryError?

2007-07-31 Thread Caldarale, Charles R
From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Recovery from OutOfMemoryError? A thread that suffers an OOME is pretty much hosed, anyway, so counting on it to do any kind of recovery is difficult. Why do you say that? The only thing that failed is the allocation of some

Re: Recovery from OutOfMemoryError?

2007-07-31 Thread Leon Rosenberg
that at once, we risk an OOME. -Original Message- From: Andrew Miehs [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 31, 2007 10:01 AM To: Tomcat Users List Subject: Re: Recovery from OutOfMemoryError? On 31/07/2007, at 6:52 PM, Craig Berry wrote: Fixing the bug would be cool

Re: Recovery from OutOfMemoryError?

2007-07-31 Thread Leon Rosenberg
On 7/31/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Recovery from OutOfMemoryError? A thread that suffers an OOME is pretty much hosed, anyway, so counting on it to do any kind of recovery is difficult. Why do you

Re: Recovery from OutOfMemoryError?

2007-07-31 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Recovery from OutOfMemoryError? A thread that suffers an OOME is pretty much hosed, anyway, so counting on it to do any kind of recovery

RE: Recovery from OutOfMemoryError?

2007-07-31 Thread Caldarale, Charles R
From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Subject: Re: Recovery from OutOfMemoryError? Thats however strongly depend on where it happened... if for example the code in question was a middleware stub which is left in unpredictable state, or the orb itself, or any kind of stack

Re: Recovery from OutOfMemoryError?

2007-07-31 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, Caldarale, Charles R wrote: From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Subject: Re: Recovery from OutOfMemoryError? Thats however strongly depend on where it happened... if for example the code in question was a middleware stub which

Re: Recovery from OutOfMemoryError?

2007-07-31 Thread Leon Rosenberg
On 8/1/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: ... but these often aren't learned until something catastrophic happens. great sentence :-) Leon - To start a new topic, e-mail: users@tomcat.apache.org To

RE: Recovery from OutOfMemoryError?

2007-07-31 Thread Caldarale, Charles R
From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Recovery from OutOfMemoryError? Are you suggesting that all methods should be written as a loops around attempts to do real work, catching OOME and re-trying until the work gets done? Sort of, but not at the method level

RE: Recovery from OutOfMemoryError?

2007-07-31 Thread Caldarale, Charles R
From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Recovery from OutOfMemoryError? (Sorry for not responding sooner. Went out to dinner and to see the Spider Pig movie :-) Actually, my past experience has been that it's the GC thread that OOMEs, not a worker thread. Assuming

Re: Recovery from OutOfMemoryError?

2007-07-31 Thread Peter Stavrinides
profiling tool, make the most of it. Peter Caldarale, Charles R wrote: From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Recovery from OutOfMemoryError? (Sorry for not responding sooner. Went out to dinner and to see the Spider Pig movie :-) Actually, my past