Re: Tomcat Runs OutOfMemory (Not at repeated WAR deployments)

2008-07-04 Thread Maduranga
I changed options to :

export CATALINA_OPTS=-server -XX:+HeapDumpOnOutOfMemoryError
-verbose:gc -XX:HeapDumpPath=/data02/www2/vhosts/merchants.koodos.com/dumps/
-Xms1024m -Xmx1024m

Waiting to see the results today. Since a couple of days only this
issue started (OutOfMem..)

I can see the garbage collection happening, but it seems growing in 5
or 10 mb folds.
Still Tomcat is keeping up. After about 8 hours of work only must see
the results as thats the usual time
it crashes.

Thanks
Maduranga


On Fri, Jul 4, 2008 at 5:56 AM, Surendrakumar Viswanathan -X (suviswan
- HCL at Cisco) [EMAIL PROTECTED] wrote:
 Hi
  Add  -XX:+HeapDumpOnOutOfMemoryError option to you JVM parameter. It
 will dump the heap (in hprof format) on OOM. You can take the hprof file
 and then analyze using Eclipse MAT (Memory Analyzer tool). This will
 give you information on which objects are getting used most. Based on
 that you can find out the corresponding application code and check
 whether there are memory leak exists in the code.
  The random slowness is usually associated with GC. Enable verboseGC
 with timestamp option and then check whether the GC is happening at the
 corresponding time of slowness.

 Suren

 -Original Message-
 From: Maduranga [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 04, 2008 3:22 AM
 To: Tomcat Users List
 Subject: Re: Tomcat Runs OutOfMemory (Not at repeated WAR deployments)

 Its 32 bit. Sorry I missed that earlier.

 Could be a problem with web app. Could you give me an
 idea/example for a profiler? Any open source ones available?

 I am really in a tight schedule to get this sorted out. All
 the help much appreciated Thanks a lot

 Maduranga


 On Thu, Jul 3, 2008 at 6:13 PM, Caldarale, Charles R
 [EMAIL PROTECTED] wrote:
  From: Maduranga [mailto:[EMAIL PROTECTED]
  Subject: Re: Tomcat Runs OutOfMemory (Not at repeated WAR
  deployments)
 
  OS: Red Hat Enterprise Linux AS release 4 (Nahant Update 2)
 
  Is that 64-bit or 32-bit?
 
  I have 2G ram for JVM, but I would like to stick with 1G if its
  possible.
 
  If that's 2G for the entire JVM process, the maximum heap
 you can get away with would be somewhere around 1.5G, since
 there's a fair amount of space needed for code, libraries,
 file space, etc.
 
  Do you recommend upgrading to Tomcat 6?
 
  Might have some benefit, but you really need to run a
 profiler to find out what's consuming the memory.  The
 problem is likely to like with your webapp, not Tomcat itself.
 
   - Chuck
 
 
  THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR
 OTHERWISE PROPRIETARY MATERIAL and is thus for use only by
 the intended recipient. If you received this in error, please
 contact the sender and delete the e-mail and its attachments
 from all computers.
 
 
 -
  To start a new topic, e-mail: users@tomcat.apache.org To
 unsubscribe,
  e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



 --
 Maduranga

 -
 To start a new topic, e-mail: users@tomcat.apache.org To
 unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Maduranga

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Runs OutOfMemory (Not at repeated WAR deployments)

2008-07-04 Thread Maduranga
Thanks a lot for the Tip.

Eclipse MAT helped a lot!

All the best to all of you!!


On Fri, Jul 4, 2008 at 5:56 AM, Surendrakumar Viswanathan -X (suviswan
- HCL at Cisco) [EMAIL PROTECTED] wrote:
 Hi
  Add  -XX:+HeapDumpOnOutOfMemoryError option to you JVM parameter. It
 will dump the heap (in hprof format) on OOM. You can take the hprof file
 and then analyze using Eclipse MAT (Memory Analyzer tool). This will
 give you information on which objects are getting used most. Based on
 that you can find out the corresponding application code and check
 whether there are memory leak exists in the code.
  The random slowness is usually associated with GC. Enable verboseGC
 with timestamp option and then check whether the GC is happening at the
 corresponding time of slowness.

 Suren

 -Original Message-
 From: Maduranga [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 04, 2008 3:22 AM
 To: Tomcat Users List
 Subject: Re: Tomcat Runs OutOfMemory (Not at repeated WAR deployments)

 Its 32 bit. Sorry I missed that earlier.

 Could be a problem with web app. Could you give me an
 idea/example for a profiler? Any open source ones available?

 I am really in a tight schedule to get this sorted out. All
 the help much appreciated Thanks a lot

 Maduranga


 On Thu, Jul 3, 2008 at 6:13 PM, Caldarale, Charles R
 [EMAIL PROTECTED] wrote:
  From: Maduranga [mailto:[EMAIL PROTECTED]
  Subject: Re: Tomcat Runs OutOfMemory (Not at repeated WAR
  deployments)
 
  OS: Red Hat Enterprise Linux AS release 4 (Nahant Update 2)
 
  Is that 64-bit or 32-bit?
 
  I have 2G ram for JVM, but I would like to stick with 1G if its
  possible.
 
  If that's 2G for the entire JVM process, the maximum heap
 you can get away with would be somewhere around 1.5G, since
 there's a fair amount of space needed for code, libraries,
 file space, etc.
 
  Do you recommend upgrading to Tomcat 6?
 
  Might have some benefit, but you really need to run a
 profiler to find out what's consuming the memory.  The
 problem is likely to like with your webapp, not Tomcat itself.
 
   - Chuck
 
 
  THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR
 OTHERWISE PROPRIETARY MATERIAL and is thus for use only by
 the intended recipient. If you received this in error, please
 contact the sender and delete the e-mail and its attachments
 from all computers.
 
 
 -
  To start a new topic, e-mail: users@tomcat.apache.org To
 unsubscribe,
  e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



 --
 Maduranga

 -
 To start a new topic, e-mail: users@tomcat.apache.org To
 unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Maduranga

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat Runs OutOfMemory (Not at repeated WAR deployments)

2008-07-03 Thread Caldarale, Charles R
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Subject: Tomcat Runs OutOfMemory (Not at repeated WAR deployments)

 I changed many JVM parameters with no luck and currently it is:
 -server -Xms512m -Xmx2048m -XX:NewSize=128m -XX:MaxNewSize=128m
 -XX:SurvivorRatio=4

I would strongly recommend against playing with NewSize, MaxNewSize, or 
SurvivorRatio; getting them even slightly out of kilter can foul things up 
pretty quickly.

What platform are you running on?  If it's not 64-bit, the -Xmx2048m won't 
work.  How much RAM do you have that you can give to the JVM?  Your -Xmx 
setting must be noticeably smaller than that, or you'll get into page thrashing.

Setting -Xms and -Xmx to the same value is usually benficial.

Moving up to a 1.6 JVM may help.

You should run a heap profiler and find out exactly what is consuming the heap 
and where it's being allcoated.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Runs OutOfMemory (Not at repeated WAR deployments)

2008-07-03 Thread Maduranga
OS: Red Hat Enterprise Linux AS release 4 (Nahant Update 2)

I have 2G ram for JVM, but I would like to stick with 1G if its possible.

With the change of JVM settings still no positive result.. therefore I
will switch back to Xms and Xms as you say. (with a same value -- 1G may be?).

Do you recommend upgrading to Tomcat 6?

Thanks Chuck for your responses, much appreciated!

/Maduranga

On Thu, Jul 3, 2008 at 4:49 PM, Caldarale, Charles R
[EMAIL PROTECTED] wrote:
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Subject: Tomcat Runs OutOfMemory (Not at repeated WAR deployments)

 I changed many JVM parameters with no luck and currently it is:
 -server -Xms512m -Xmx2048m -XX:NewSize=128m -XX:MaxNewSize=128m
 -XX:SurvivorRatio=4

 I would strongly recommend against playing with NewSize, MaxNewSize, or 
 SurvivorRatio; getting them even slightly out of kilter can foul things up 
 pretty quickly.

 What platform are you running on?  If it's not 64-bit, the -Xmx2048m won't 
 work.  How much RAM do you have that you can give to the JVM?  Your -Xmx 
 setting must be noticeably smaller than that, or you'll get into page 
 thrashing.

 Setting -Xms and -Xmx to the same value is usually benficial.

 Moving up to a 1.6 JVM may help.

 You should run a heap profiler and find out exactly what is consuming the 
 heap and where it's being allcoated.

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
 MATERIAL and is thus for use only by the intended recipient. If you received 
 this in error, please contact the sender and delete the e-mail and its 
 attachments from all computers.

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Maduranga

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat Runs OutOfMemory (Not at repeated WAR deployments)

2008-07-03 Thread Caldarale, Charles R
 From: Maduranga [mailto:[EMAIL PROTECTED]
 Subject: Re: Tomcat Runs OutOfMemory (Not at repeated WAR deployments)

 OS: Red Hat Enterprise Linux AS release 4 (Nahant Update 2)

Is that 64-bit or 32-bit?

 I have 2G ram for JVM, but I would like to stick with 1G if
 its possible.

If that's 2G for the entire JVM process, the maximum heap you can get away with 
would be somewhere around 1.5G, since there's a fair amount of space needed for 
code, libraries, file space, etc.

 Do you recommend upgrading to Tomcat 6?

Might have some benefit, but you really need to run a profiler to find out 
what's consuming the memory.  The problem is likely to like with your webapp, 
not Tomcat itself.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Runs OutOfMemory (Not at repeated WAR deployments)

2008-07-03 Thread Maduranga
Its 32 bit. Sorry I missed that earlier.

Could be a problem with web app. Could you give me an idea/example for
a profiler? Any open source ones available?

I am really in a tight schedule to get this sorted out. All the help
much appreciated
Thanks a lot

Maduranga


On Thu, Jul 3, 2008 at 6:13 PM, Caldarale, Charles R
[EMAIL PROTECTED] wrote:
 From: Maduranga [mailto:[EMAIL PROTECTED]
 Subject: Re: Tomcat Runs OutOfMemory (Not at repeated WAR deployments)

 OS: Red Hat Enterprise Linux AS release 4 (Nahant Update 2)

 Is that 64-bit or 32-bit?

 I have 2G ram for JVM, but I would like to stick with 1G if
 its possible.

 If that's 2G for the entire JVM process, the maximum heap you can get away 
 with would be somewhere around 1.5G, since there's a fair amount of space 
 needed for code, libraries, file space, etc.

 Do you recommend upgrading to Tomcat 6?

 Might have some benefit, but you really need to run a profiler to find out 
 what's consuming the memory.  The problem is likely to like with your webapp, 
 not Tomcat itself.

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
 MATERIAL and is thus for use only by the intended recipient. If you received 
 this in error, please contact the sender and delete the e-mail and its 
 attachments from all computers.

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Maduranga

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat Runs OutOfMemory (Not at repeated WAR deployments)

2008-07-03 Thread Surendrakumar Viswanathan -X (suviswan - HCL at Cisco)
Hi 
  Add  -XX:+HeapDumpOnOutOfMemoryError option to you JVM parameter. It
will dump the heap (in hprof format) on OOM. You can take the hprof file
and then analyze using Eclipse MAT (Memory Analyzer tool). This will
give you information on which objects are getting used most. Based on
that you can find out the corresponding application code and check
whether there are memory leak exists in the code.
  The random slowness is usually associated with GC. Enable verboseGC
with timestamp option and then check whether the GC is happening at the
corresponding time of slowness.

Suren

 -Original Message-
 From: Maduranga [mailto:[EMAIL PROTECTED] 
 Sent: Friday, July 04, 2008 3:22 AM
 To: Tomcat Users List
 Subject: Re: Tomcat Runs OutOfMemory (Not at repeated WAR deployments)
 
 Its 32 bit. Sorry I missed that earlier.
 
 Could be a problem with web app. Could you give me an 
 idea/example for a profiler? Any open source ones available?
 
 I am really in a tight schedule to get this sorted out. All 
 the help much appreciated Thanks a lot
 
 Maduranga
 
 
 On Thu, Jul 3, 2008 at 6:13 PM, Caldarale, Charles R 
 [EMAIL PROTECTED] wrote:
  From: Maduranga [mailto:[EMAIL PROTECTED]
  Subject: Re: Tomcat Runs OutOfMemory (Not at repeated WAR 
  deployments)
 
  OS: Red Hat Enterprise Linux AS release 4 (Nahant Update 2)
 
  Is that 64-bit or 32-bit?
 
  I have 2G ram for JVM, but I would like to stick with 1G if its 
  possible.
 
  If that's 2G for the entire JVM process, the maximum heap 
 you can get away with would be somewhere around 1.5G, since 
 there's a fair amount of space needed for code, libraries, 
 file space, etc.
 
  Do you recommend upgrading to Tomcat 6?
 
  Might have some benefit, but you really need to run a 
 profiler to find out what's consuming the memory.  The 
 problem is likely to like with your webapp, not Tomcat itself.
 
   - Chuck
 
 
  THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR 
 OTHERWISE PROPRIETARY MATERIAL and is thus for use only by 
 the intended recipient. If you received this in error, please 
 contact the sender and delete the e-mail and its attachments 
 from all computers.
 
  
 -
  To start a new topic, e-mail: users@tomcat.apache.org To 
 unsubscribe, 
  e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 --
 Maduranga
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org To 
 unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]