RE: Tomcat Running out of Memory

2004-12-12 Thread Dale, Matt

I've replied to this further down the thread but as an aside there are ways to 
bump up the max process size to 3G (with kernel shenanigans) but 32 bit java is 
fixed at 2G. The figure 1850MB doesnt sounds quite right but it's probably 
related to the default max process size of 2G and the java process will be 
bigger than the heap so you won't quite get the full 2G

-Original Message-
From: Richey, Ross [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 09, 2004 8:45 PM
To: Tomcat Users List
Subject: Tomcat Running out of Memory


My tomcat process runs out of memory (unless rebooted) approximately
every three days.

Vital Statistics:
-Our consultant-designed website consists of approximately 5000 JSP
pages.  None of these pages pull from a backend, the java was merely
used to provide a persistent border.
-Max heap size is set to 1850 megs, (which from what I understand is the
max on a 32-bit system).
-The server has 4 gigs of total RAM.
-JDK 1.4
-Tomcat 5.0.18
-Redhat 7.3

I've done some searches on Google and in the archives and I can't seem
to find any way to turn up the frequency of the garbage collection.
Everything seems to indicate that once a JSP is loaded into memory it
stays there.

Is there some way to increase the max heap size?
Or some way to increase the frequency of garbage collection?
Or any other way to slow down the memory usage?

Ross Richey
Webmaster, www.aruplab.com

The information transmitted by this e-mail and any included
attachments are from ARUP Laboratories and are intended only for the
recipient. The information contained in this message is confidential
and may constitute inside or non-public information under
international, federal, or state securities laws, or protected health
information and is intended only for the use of the recipient.
Unauthorized forwarding, printing, copying, distributing, or use of
such information is strictly prohibited and may be unlawful. If you
are not the intended recipient, please promptly delete this e-mail
and notify the sender of the delivery error or you may call ARUP
Laboratories Compliance Hot Line in Salt Lake City, Utah USA at (+1
(800) 522-2787 ext. 2100
Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not 
the intended recipient or the person responsible for delivering to the intended 
recipient, be advised that you have received this E-mail in error and that any 
use or copying is strictly prohibited. If you have received this E-mail in 
error please notify the beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual 
sender and not beCogent Ltd. You must take full responsibility for virus 
checking this email and any attachments.
Please note that the content of this email or any of its attachments may 
contain data that falls within the scope of the Data Protection Acts and that 
you must ensure that any handling or processing of such data by you is fully 
compliant with the terms and provisions of the Data Protection Act 1984 and 
1998.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Tomcat Running out of Memory

2004-12-12 Thread Dale, Matt

Hi,

As an addition to this i'd like to add that if you are not explicitly 
increasing your permanent generation then I'm not surprised that many JSPs 
would fill it up. You will probably find that the default Maximum size of the 
Permanent generation is 64MB and it is that which is filling up and not the 
full 1850MB of your heap.

A tool you should look into is jvmstat which is available from sun and gives 
you a grahical representation of the heap real time so you can see what is 
running out.

As a tip -XX:MaxPermSize=256M might be a good option for your JAVA_OPTS.

Ta
Matt

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Friday, December 10, 2004 2:00 PM
To: Tomcat Users List
Subject: RE: Tomcat Running out of Memory



Hi,

-Our consultant-designed website consists of approximately 5000 JSP
pages.  None of these pages pull from a backend, the java was merely
used to provide a persistent border.

Are these JSPs precompiled?

-Max heap size is set to 1850 megs, (which from what I understand is
the
max on a 32-bit system).

It's not.  The max in JDK 1.4 is 2GB for the vast majority of 32-bit
platforms, including yours.  You'd have to search far and hard to find
any platform that imposes a memory limit that's not a power of 2 ;)

-The server has 4 gigs of total RAM.

Which doesn't matter because you're only giving the JVM 1850MB.

I've done some searches on Google and in the archives and I can't seem
to find any way to turn up the frequency of the garbage collection.

To turn up the frequency of garbage collection, you would use several
JVM options, as documented at
http://java.sun.com/docs/hotspot/VMOptions.html.  In fact, the related
document at http://java.sun.com/docs/hotspot/gc1.4.2/index.html is vital
reading.

Everything seems to indicate that once a JSP is loaded into memory it
stays there.

Why wouldn't it?  It's a compiled class that goes into the permanent
generation (not the heap).  Classes themselves (as opposed to their
instances) would be unloaded only if possible and only at time of dire
memory trouble, as judged by the VM.

Is there some way to increase the max heap size?

Yes, using the -Xmx parameter.

Or some way to increase the frequency of garbage collection?

Yes, see the VM options above.

Or any other way to slow down the memory usage?

Yes, to critically inspect the design and implementation of your app
such that less memory is used.  This is typically a performance
tradeoff, as you would cache and retain less in memory, leaving more in
the database or disk as needed.

If you're not precompiling your JSPs, you should: compiling 5000 JSPs is
a significant drain on resources, although those resource should largely
be released.  See the note on javac's memory leak in Tomcat's release
notes.

Yoav Shapira http://www.yoavshapira.com




This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, proprietary 
and/or privileged.  This e-mail is intended only for the individual(s) to whom 
it is addressed, and may not be saved, copied, printed, disclosed or used by 
anyone else.  If you are not the(an) intended recipient, please immediately 
delete this e-mail from your computer system and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not 
the intended recipient or the person responsible for delivering to the intended 
recipient, be advised that you have received this E-mail in error and that any 
use or copying is strictly prohibited. If you have received this E-mail in 
error please notify the beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual 
sender and not beCogent Ltd. You must take full responsibility for virus 
checking this email and any attachments.
Please note that the content of this email or any of its attachments may 
contain data that falls within the scope of the Data Protection Acts and that 
you must ensure that any handling or processing of such data by you is fully 
compliant with the terms and provisions of the Data Protection Act 1984 and 
1998.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Tomcat Running out of Memory

2004-12-10 Thread Shapira, Yoav

Hi,

-Our consultant-designed website consists of approximately 5000 JSP
pages.  None of these pages pull from a backend, the java was merely
used to provide a persistent border.

Are these JSPs precompiled?

-Max heap size is set to 1850 megs, (which from what I understand is
the
max on a 32-bit system).

It's not.  The max in JDK 1.4 is 2GB for the vast majority of 32-bit
platforms, including yours.  You'd have to search far and hard to find
any platform that imposes a memory limit that's not a power of 2 ;)

-The server has 4 gigs of total RAM.

Which doesn't matter because you're only giving the JVM 1850MB.

I've done some searches on Google and in the archives and I can't seem
to find any way to turn up the frequency of the garbage collection.

To turn up the frequency of garbage collection, you would use several
JVM options, as documented at
http://java.sun.com/docs/hotspot/VMOptions.html.  In fact, the related
document at http://java.sun.com/docs/hotspot/gc1.4.2/index.html is vital
reading.

Everything seems to indicate that once a JSP is loaded into memory it
stays there.

Why wouldn't it?  It's a compiled class that goes into the permanent
generation (not the heap).  Classes themselves (as opposed to their
instances) would be unloaded only if possible and only at time of dire
memory trouble, as judged by the VM.

Is there some way to increase the max heap size?

Yes, using the -Xmx parameter.

Or some way to increase the frequency of garbage collection?

Yes, see the VM options above.

Or any other way to slow down the memory usage?

Yes, to critically inspect the design and implementation of your app
such that less memory is used.  This is typically a performance
tradeoff, as you would cache and retain less in memory, leaving more in
the database or disk as needed.

If you're not precompiling your JSPs, you should: compiling 5000 JSPs is
a significant drain on resources, although those resource should largely
be released.  See the note on javac's memory leak in Tomcat's release
notes.

Yoav Shapira http://www.yoavshapira.com




This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, proprietary 
and/or privileged.  This e-mail is intended only for the individual(s) to whom 
it is addressed, and may not be saved, copied, printed, disclosed or used by 
anyone else.  If you are not the(an) intended recipient, please immediately 
delete this e-mail from your computer system and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Tomcat Running out of Memory

2004-12-09 Thread Richey, Ross
My tomcat process runs out of memory (unless rebooted) approximately
every three days.

Vital Statistics:
-Our consultant-designed website consists of approximately 5000 JSP
pages.  None of these pages pull from a backend, the java was merely
used to provide a persistent border.
-Max heap size is set to 1850 megs, (which from what I understand is the
max on a 32-bit system).
-The server has 4 gigs of total RAM.
-JDK 1.4
-Tomcat 5.0.18
-Redhat 7.3

I've done some searches on Google and in the archives and I can't seem
to find any way to turn up the frequency of the garbage collection.
Everything seems to indicate that once a JSP is loaded into memory it
stays there.

Is there some way to increase the max heap size?
Or some way to increase the frequency of garbage collection?
Or any other way to slow down the memory usage?

Ross Richey
Webmaster, www.aruplab.com

The information transmitted by this e-mail and any included
attachments are from ARUP Laboratories and are intended only for the
recipient. The information contained in this message is confidential
and may constitute inside or non-public information under
international, federal, or state securities laws, or protected health
information and is intended only for the use of the recipient.
Unauthorized forwarding, printing, copying, distributing, or use of
such information is strictly prohibited and may be unlawful. If you
are not the intended recipient, please promptly delete this e-mail
and notify the sender of the delivery error or you may call ARUP
Laboratories Compliance Hot Line in Salt Lake City, Utah USA at (+1
(800) 522-2787 ext. 2100

Re: Tomcat Running out of Memory

2004-12-09 Thread Ben Souther
There was a memory leak in j2sdk1.4.1xxx, I believe.
Is that the one you're using?




On Thu, 2004-12-09 at 15:45, Richey, Ross wrote:
 My tomcat process runs out of memory (unless rebooted) approximately
 every three days.
 
 Vital Statistics:
 -Our consultant-designed website consists of approximately 5000 JSP
 pages.  None of these pages pull from a backend, the java was merely
 used to provide a persistent border.
 -Max heap size is set to 1850 megs, (which from what I understand is the
 max on a 32-bit system).
 -The server has 4 gigs of total RAM.
 -JDK 1.4
 -Tomcat 5.0.18
 -Redhat 7.3
 
 I've done some searches on Google and in the archives and I can't seem
 to find any way to turn up the frequency of the garbage collection.
 Everything seems to indicate that once a JSP is loaded into memory it
 stays there.
 
 Is there some way to increase the max heap size?
 Or some way to increase the frequency of garbage collection?
 Or any other way to slow down the memory usage?
 
 Ross Richey
 Webmaster, www.aruplab.com
 
 The information transmitted by this e-mail and any included
 attachments are from ARUP Laboratories and are intended only for the
 recipient. The information contained in this message is confidential
 and may constitute inside or non-public information under
 international, federal, or state securities laws, or protected health
 information and is intended only for the use of the recipient.
 Unauthorized forwarding, printing, copying, distributing, or use of
 such information is strictly prohibited and may be unlawful. If you
 are not the intended recipient, please promptly delete this e-mail
 and notify the sender of the delivery error or you may call ARUP
 Laboratories Compliance Hot Line in Salt Lake City, Utah USA at (+1
 (800) 522-2787 ext. 2100


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat Running out of Memory

2004-12-09 Thread Richey, Ross
Sorry should have been more specific, the JDK is: 1.4.2 (the install bin
is: j2sdk-1_4_2-nb-3_5_1-bin-linux.bin)

I seem to remember looking into that, and deciding that couldn't be it,
because it was a different version.

Ross

-Original Message-
From: Ben Souther [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 09, 2004 1:48 PM
To: Tomcat Users List
Subject: Re: Tomcat Running out of Memory


There was a memory leak in j2sdk1.4.1xxx, I believe.
Is that the one you're using?




On Thu, 2004-12-09 at 15:45, Richey, Ross wrote:
 My tomcat process runs out of memory (unless rebooted) approximately 
 every three days.
 
 Vital Statistics:
 -Our consultant-designed website consists of approximately 5000 JSP 
 pages.  None of these pages pull from a backend, the java was merely 
 used to provide a persistent border. -Max heap size is set to 1850 
 megs, (which from what I understand is the max on a 32-bit system).
 -The server has 4 gigs of total RAM.
 -JDK 1.4
 -Tomcat 5.0.18
 -Redhat 7.3
 
 I've done some searches on Google and in the archives and I can't seem

 to find any way to turn up the frequency of the garbage collection. 
 Everything seems to indicate that once a JSP is loaded into memory it 
 stays there.
 
 Is there some way to increase the max heap size?
 Or some way to increase the frequency of garbage collection? Or any 
 other way to slow down the memory usage?
 
 Ross Richey
 Webmaster, www.aruplab.com
 
 The information transmitted by this e-mail and any included 
 attachments are from ARUP Laboratories and are intended only for the 
 recipient. The information contained in this message is confidential 
 and may constitute inside or non-public information under 
 international, federal, or state securities laws, or protected health 
 information and is intended only for the use of the recipient. 
 Unauthorized forwarding, printing, copying, distributing, or use of 
 such information is strictly prohibited and may be unlawful. If you 
 are not the intended recipient, please promptly delete this e-mail and

 notify the sender of the delivery error or you may call ARUP 
 Laboratories Compliance Hot Line in Salt Lake City, Utah USA at (+1
 (800) 522-2787 ext. 2100


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




The information transmitted by this e-mail and any included
attachments are from ARUP Laboratories and are intended only for the
recipient. The information contained in this message is confidential
and may constitute inside or non-public information under
international, federal, or state securities laws, or protected health
information and is intended only for the use of the recipient.
Unauthorized forwarding, printing, copying, distributing, or use of
such information is strictly prohibited and may be unlawful. If you
are not the intended recipient, please promptly delete this e-mail
and notify the sender of the delivery error or you may call ARUP
Laboratories Compliance Hot Line in Salt Lake City, Utah USA at (+1
(800) 522-2787 ext. 2100