You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michael Cornell <mi...@estafet.com> on 2005/02/07 11:37:13 UTC
outOfMemory exception under high load
Hi,
Hi,
I am experiencing a problem many others seem to have had before, but
have found no answers. I am running Tomcat 5.0.25 using jdk 1.4.2_06
hotspot vm on RedHat Linux ES with 4G Ram and twin Intel procs.
When load-testing, under high stress I receive the error below and the
thread dies.
04-Feb-2005 13:39:24 org.apache.coyote.tomcat5.CoyoteAdapter service
SEVERE: An exception or error occurred in the container during the
request processing
java.lang.OutOfMemoryError
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:112)
at java.util.jar.JarFile.<init>(JarFile.java:127)
..
I have adjusted the vm parameters to the below ( the perm space does not
get full and the Xint to not use the optimised settings..
-server -Xms1G -Xmx1G -Xmn384m -XX:SurvivorRatio=7 -XX:PermSize=64m
-XX:MaxPermSize=128m -Xint
In addition I have added the" reloading=false and development=false in
conf/web.xml. " as per instruction from this thread:
http://www.junlu.com/msg/78566.html
My connector is configured thus:
<Connector
port="80"
maxThreads="1000"
minSpareThreads="1000"
maxSpareThreads="1000"
enableLookups="false"
redirectPort="8443"
acceptCount="3000"
debug="0"
connectionTimeout="20000"
disableUploadTimeout="true" />
However all of this is to no avail, and under high stress (80+
concurrent requests, tomcat dies and terminates the thread dumping a
hs_pid12345.log with the above message
Is this a known hotspot 1.4.x problem (some threads have hinted at
this), or does someone have a solution for this??
Thanks,
M
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: outOfMemory exception under high load
Posted by reynir <re...@hugsmidjan.is>.
If I remember it correctly Xmn384m defines the next step in increasing
the allocated memory. there for if you have 1800m used and the max is at
2g, taking a step of almost 400m may not work.
Why are you setting these paremeters :
-Xmn384m
-XX:SurvivorRatio=7
-XX:PermSize=64m
-XX:MaxPermSize=128m
-Xint
I usually only set the -Xmx and -server
Your problem might also be kernel based problem, you might need a kernel
update, but I'm not a specialist on that subject. I only know that there
are some limitations in some linux setups on how much memory it can make
use of, but I think the limit lies around 4gigs. but that dependes on
which kernel you are using etc.
Michael Cornell wrote:
>Sorry, that was a copy and paste typo :( Its set at 2G (4G for the
>whole machine)
>/m
>
>reynir wrote:
>
>
>
>>well, your -Xmx1G set's the limit for memory usage at 1 gig. ?
>>-server -Xms1G -Xmx1G -Xmn384m -XX:SurvivorRatio=7 -XX:PermSize=64m
>>-XX:MaxPermSize=128m -Xint
>>
>>you might want to set that a little higher.
>>
>>
>>Michael Cornell wrote:
>>
>>
>>
>>>Not exactly sure but by running vmstat, it look like I am nearing the 2G
>>>limit .. maybe about 1.8G consumed..
>>>
>>>/m
>>>
>>>reynir wrote:
>>>
>>>
>>>
>>>
>>>
>>>>how much memory is your process using when it crashes ?
>>>>-r
>>>>
>>>>
>>>>Michael Cornell wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>Hi,
>>>>>
>>>>>Hi,
>>>>>
>>>>>I am experiencing a problem many others seem to have had before, but
>>>>>have found no answers. I am running Tomcat 5.0.25 using jdk 1.4.2_06
>>>>>hotspot vm on RedHat Linux ES with 4G Ram and twin Intel procs.
>>>>>
>>>>>When load-testing, under high stress I receive the error below and the
>>>>>thread dies.
>>>>>
>>>>>04-Feb-2005 13:39:24 org.apache.coyote.tomcat5.CoyoteAdapter service
>>>>>SEVERE: An exception or error occurred in the container during the
>>>>>request processing
>>>>>java.lang.OutOfMemoryError
>>>>> at java.util.zip.ZipFile.open(Native Method)
>>>>> at java.util.zip.ZipFile.<init>(ZipFile.java:112)
>>>>> at java.util.jar.JarFile.<init>(JarFile.java:127)
>>>>>..
>>>>>
>>>>>I have adjusted the vm parameters to the below ( the perm space
>>>>>does not
>>>>>get full and the Xint to not use the optimised settings..
>>>>>-server -Xms1G -Xmx1G -Xmn384m -XX:SurvivorRatio=7 -XX:PermSize=64m
>>>>>-XX:MaxPermSize=128m -Xint
>>>>>
>>>>>In addition I have added the" reloading=false and
>>>>>development=false in
>>>>>conf/web.xml. " as per instruction from this thread:
>>>>>http://www.junlu.com/msg/78566.html
>>>>>
>>>>>My connector is configured thus:
>>>>> <Connector
>>>>> port="80"
>>>>> maxThreads="1000"
>>>>> minSpareThreads="1000"
>>>>> maxSpareThreads="1000"
>>>>> enableLookups="false"
>>>>> redirectPort="8443"
>>>>> acceptCount="3000"
>>>>> debug="0"
>>>>> connectionTimeout="20000"
>>>>> disableUploadTimeout="true" />
>>>>>
>>>>>
>>>>>However all of this is to no avail, and under high stress (80+
>>>>>concurrent requests, tomcat dies and terminates the thread dumping a
>>>>>hs_pid12345.log with the above message
>>>>>
>>>>>Is this a known hotspot 1.4.x problem (some threads have hinted at
>>>>>this), or does someone have a solution for this??
>>>>>
>>>>>Thanks,
>>>>>
>>>>>M
>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: outOfMemory exception under high load
Posted by Michael Cornell <mi...@estafet.com>.
Sorry, that was a copy and paste typo :( Its set at 2G (4G for the
whole machine)
/m
reynir wrote:
> well, your -Xmx1G set's the limit for memory usage at 1 gig. ?
> -server -Xms1G -Xmx1G -Xmn384m -XX:SurvivorRatio=7 -XX:PermSize=64m
> -XX:MaxPermSize=128m -Xint
>
> you might want to set that a little higher.
>
>
> Michael Cornell wrote:
>
>> Not exactly sure but by running vmstat, it look like I am nearing the 2G
>> limit .. maybe about 1.8G consumed..
>>
>> /m
>>
>> reynir wrote:
>>
>>
>>
>>> how much memory is your process using when it crashes ?
>>> -r
>>>
>>>
>>> Michael Cornell wrote:
>>>
>>>
>>>
>>>> Hi,
>>>>
>>>> Hi,
>>>>
>>>> I am experiencing a problem many others seem to have had before, but
>>>> have found no answers. I am running Tomcat 5.0.25 using jdk 1.4.2_06
>>>> hotspot vm on RedHat Linux ES with 4G Ram and twin Intel procs.
>>>>
>>>> When load-testing, under high stress I receive the error below and the
>>>> thread dies.
>>>>
>>>> 04-Feb-2005 13:39:24 org.apache.coyote.tomcat5.CoyoteAdapter service
>>>> SEVERE: An exception or error occurred in the container during the
>>>> request processing
>>>> java.lang.OutOfMemoryError
>>>> at java.util.zip.ZipFile.open(Native Method)
>>>> at java.util.zip.ZipFile.<init>(ZipFile.java:112)
>>>> at java.util.jar.JarFile.<init>(JarFile.java:127)
>>>> ..
>>>>
>>>> I have adjusted the vm parameters to the below ( the perm space
>>>> does not
>>>> get full and the Xint to not use the optimised settings..
>>>> -server -Xms1G -Xmx1G -Xmn384m -XX:SurvivorRatio=7 -XX:PermSize=64m
>>>> -XX:MaxPermSize=128m -Xint
>>>>
>>>> In addition I have added the" reloading=false and
>>>> development=false in
>>>> conf/web.xml. " as per instruction from this thread:
>>>> http://www.junlu.com/msg/78566.html
>>>>
>>>> My connector is configured thus:
>>>> <Connector
>>>> port="80"
>>>> maxThreads="1000"
>>>> minSpareThreads="1000"
>>>> maxSpareThreads="1000"
>>>> enableLookups="false"
>>>> redirectPort="8443"
>>>> acceptCount="3000"
>>>> debug="0"
>>>> connectionTimeout="20000"
>>>> disableUploadTimeout="true" />
>>>>
>>>>
>>>> However all of this is to no avail, and under high stress (80+
>>>> concurrent requests, tomcat dies and terminates the thread dumping a
>>>> hs_pid12345.log with the above message
>>>>
>>>> Is this a known hotspot 1.4.x problem (some threads have hinted at
>>>> this), or does someone have a solution for this??
>>>>
>>>> Thanks,
>>>>
>>>> M
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: outOfMemory exception under high load
Posted by reynir <re...@hugsmidjan.is>.
well, your -Xmx1G set's the limit for memory usage at 1 gig. ?
-server -Xms1G -Xmx1G -Xmn384m -XX:SurvivorRatio=7 -XX:PermSize=64m
-XX:MaxPermSize=128m -Xint
you might want to set that a little higher.
Michael Cornell wrote:
>Not exactly sure but by running vmstat, it look like I am nearing the 2G
>limit .. maybe about 1.8G consumed..
>
>/m
>
>reynir wrote:
>
>
>
>>how much memory is your process using when it crashes ?
>>-r
>>
>>
>>Michael Cornell wrote:
>>
>>
>>
>>>Hi,
>>>
>>>Hi,
>>>
>>>I am experiencing a problem many others seem to have had before, but
>>>have found no answers. I am running Tomcat 5.0.25 using jdk 1.4.2_06
>>>hotspot vm on RedHat Linux ES with 4G Ram and twin Intel procs.
>>>
>>>When load-testing, under high stress I receive the error below and the
>>>thread dies.
>>>
>>>04-Feb-2005 13:39:24 org.apache.coyote.tomcat5.CoyoteAdapter service
>>>SEVERE: An exception or error occurred in the container during the
>>>request processing
>>>java.lang.OutOfMemoryError
>>> at java.util.zip.ZipFile.open(Native Method)
>>> at java.util.zip.ZipFile.<init>(ZipFile.java:112)
>>> at java.util.jar.JarFile.<init>(JarFile.java:127)
>>>..
>>>
>>>I have adjusted the vm parameters to the below ( the perm space does not
>>>get full and the Xint to not use the optimised settings..
>>>-server -Xms1G -Xmx1G -Xmn384m -XX:SurvivorRatio=7 -XX:PermSize=64m
>>>-XX:MaxPermSize=128m -Xint
>>>
>>>In addition I have added the" reloading=false and development=false in
>>>conf/web.xml. " as per instruction from this thread:
>>>http://www.junlu.com/msg/78566.html
>>>
>>>My connector is configured thus:
>>> <Connector
>>> port="80"
>>> maxThreads="1000"
>>> minSpareThreads="1000"
>>> maxSpareThreads="1000"
>>> enableLookups="false"
>>> redirectPort="8443"
>>> acceptCount="3000"
>>> debug="0"
>>> connectionTimeout="20000"
>>> disableUploadTimeout="true" />
>>>
>>>
>>>However all of this is to no avail, and under high stress (80+
>>>concurrent requests, tomcat dies and terminates the thread dumping a
>>>hs_pid12345.log with the above message
>>>
>>>Is this a known hotspot 1.4.x problem (some threads have hinted at
>>>this), or does someone have a solution for this??
>>>
>>>Thanks,
>>>
>>>M
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: outOfMemory exception under high load
Posted by Michael Cornell <mi...@estafet.com>.
Not exactly sure but by running vmstat, it look like I am nearing the 2G
limit .. maybe about 1.8G consumed..
/m
reynir wrote:
> how much memory is your process using when it crashes ?
> -r
>
>
> Michael Cornell wrote:
>
>> Hi,
>>
>> Hi,
>>
>> I am experiencing a problem many others seem to have had before, but
>> have found no answers. I am running Tomcat 5.0.25 using jdk 1.4.2_06
>> hotspot vm on RedHat Linux ES with 4G Ram and twin Intel procs.
>>
>> When load-testing, under high stress I receive the error below and the
>> thread dies.
>>
>> 04-Feb-2005 13:39:24 org.apache.coyote.tomcat5.CoyoteAdapter service
>> SEVERE: An exception or error occurred in the container during the
>> request processing
>> java.lang.OutOfMemoryError
>> at java.util.zip.ZipFile.open(Native Method)
>> at java.util.zip.ZipFile.<init>(ZipFile.java:112)
>> at java.util.jar.JarFile.<init>(JarFile.java:127)
>> ..
>>
>> I have adjusted the vm parameters to the below ( the perm space does not
>> get full and the Xint to not use the optimised settings..
>> -server -Xms1G -Xmx1G -Xmn384m -XX:SurvivorRatio=7 -XX:PermSize=64m
>> -XX:MaxPermSize=128m -Xint
>>
>> In addition I have added the" reloading=false and development=false in
>> conf/web.xml. " as per instruction from this thread:
>> http://www.junlu.com/msg/78566.html
>>
>> My connector is configured thus:
>> <Connector
>> port="80"
>> maxThreads="1000"
>> minSpareThreads="1000"
>> maxSpareThreads="1000"
>> enableLookups="false"
>> redirectPort="8443"
>> acceptCount="3000"
>> debug="0"
>> connectionTimeout="20000"
>> disableUploadTimeout="true" />
>>
>>
>> However all of this is to no avail, and under high stress (80+
>> concurrent requests, tomcat dies and terminates the thread dumping a
>> hs_pid12345.log with the above message
>>
>> Is this a known hotspot 1.4.x problem (some threads have hinted at
>> this), or does someone have a solution for this??
>>
>> Thanks,
>>
>> M
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: outOfMemory exception under high load
Posted by reynir <re...@hugsmidjan.is>.
how much memory is your process using when it crashes ?
-r
Michael Cornell wrote:
>Hi,
>
>Hi,
>
>I am experiencing a problem many others seem to have had before, but
>have found no answers. I am running Tomcat 5.0.25 using jdk 1.4.2_06
>hotspot vm on RedHat Linux ES with 4G Ram and twin Intel procs.
>
>When load-testing, under high stress I receive the error below and the
>thread dies.
>
>04-Feb-2005 13:39:24 org.apache.coyote.tomcat5.CoyoteAdapter service
>SEVERE: An exception or error occurred in the container during the
>request processing
>java.lang.OutOfMemoryError
> at java.util.zip.ZipFile.open(Native Method)
> at java.util.zip.ZipFile.<init>(ZipFile.java:112)
> at java.util.jar.JarFile.<init>(JarFile.java:127)
>..
>
>I have adjusted the vm parameters to the below ( the perm space does not
>get full and the Xint to not use the optimised settings..
>-server -Xms1G -Xmx1G -Xmn384m -XX:SurvivorRatio=7 -XX:PermSize=64m
>-XX:MaxPermSize=128m -Xint
>
>In addition I have added the" reloading=false and development=false in
>conf/web.xml. " as per instruction from this thread:
>http://www.junlu.com/msg/78566.html
>
>My connector is configured thus:
> <Connector
> port="80"
> maxThreads="1000"
> minSpareThreads="1000"
> maxSpareThreads="1000"
> enableLookups="false"
> redirectPort="8443"
> acceptCount="3000"
> debug="0"
> connectionTimeout="20000"
> disableUploadTimeout="true" />
>
>
>However all of this is to no avail, and under high stress (80+
>concurrent requests, tomcat dies and terminates the thread dumping a
>hs_pid12345.log with the above message
>
>Is this a known hotspot 1.4.x problem (some threads have hinted at
>this), or does someone have a solution for this??
>
>Thanks,
>
>M
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
RE: outOfMemory exception under high load
Posted by George Sexton <gs...@mhsoftware.com>.
I would suggest running findbugs:
http://findbugs.sourceforge.net/
It has found issues in application code for other people on the list.
George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
> -----Original Message-----
> From: Michael Cornell [mailto:michael.cornell@estafet.com]
> Sent: Monday, February 07, 2005 3:37 AM
> To: Tomcat-User
> Subject: outOfMemory exception under high load
>
> Hi,
>
> Hi,
>
> I am experiencing a problem many others seem to have had before, but
> have found no answers. I am running Tomcat 5.0.25 using jdk 1.4.2_06
> hotspot vm on RedHat Linux ES with 4G Ram and twin Intel procs.
>
> When load-testing, under high stress I receive the error below and the
> thread dies.
>
> 04-Feb-2005 13:39:24 org.apache.coyote.tomcat5.CoyoteAdapter service
> SEVERE: An exception or error occurred in the container during the
> request processing
> java.lang.OutOfMemoryError
> at java.util.zip.ZipFile.open(Native Method)
> at java.util.zip.ZipFile.<init>(ZipFile.java:112)
> at java.util.jar.JarFile.<init>(JarFile.java:127)
> ..
>
> I have adjusted the vm parameters to the below ( the perm
> space does not
> get full and the Xint to not use the optimised settings..
> -server -Xms1G -Xmx1G -Xmn384m -XX:SurvivorRatio=7 -XX:PermSize=64m
> -XX:MaxPermSize=128m -Xint
>
> In addition I have added the" reloading=false and
> development=false in
> conf/web.xml. " as per instruction from this thread:
> http://www.junlu.com/msg/78566.html
>
> My connector is configured thus:
> <Connector
> port="80"
> maxThreads="1000"
> minSpareThreads="1000"
> maxSpareThreads="1000"
> enableLookups="false"
> redirectPort="8443"
> acceptCount="3000"
> debug="0"
> connectionTimeout="20000"
> disableUploadTimeout="true" />
>
>
> However all of this is to no avail, and under high stress (80+
> concurrent requests, tomcat dies and terminates the thread dumping a
> hs_pid12345.log with the above message
>
> Is this a known hotspot 1.4.x problem (some threads have hinted at
> this), or does someone have a solution for this??
>
> Thanks,
>
> M
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org