You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by acec acec <to...@yahoo.ca> on 2007/03/12 20:28:27 UTC

apache-tomcat-6.0.10 OutOfMemoryError

Hi,
I tested tomcat 6.0.10 using jmeter. I found the
following problem.

I defined three thread groups:
============================First
thread-group============================
thread Properties:
  Number of Threads(users): 50
  Ramp-Up Period(in seconds): 10
  Loop Count: 1000

HTTP Request
  path: /examples/servlets/servlet/HelloWorldExample

Constant Timer
  Thread Delay (in milliseconds): 10

============================Second
thread-group============================
thread Properties:
  Number of Threads(users): 50
  Ramp-Up Period(in seconds): 10
  Loop Count: 1000

HTTP Request
  path: /examples/jsp/tagplugin/foreach.jsp

Constant Timer
  Thread Delay (in milliseconds): 10

============================Third
thread-group============================
thread Properties:
  Number of Threads(users): 1
  Ramp-Up Period(in seconds): 1
  Loop Count: 1000

HTTP Request
  path: /manager/status
  Send parameter with request: XML(Name) true(Value)

Constant Timer
  Thread Delay (in milliseconds): 1000
===========================================================================

I found tomcat 6.0.10 will use 100% CPU in a few
minutes, then I stop sending http request in jmeter.
After that, I accessed another jsp page:
/examples/jsp/jsp2/el/basic-arithmetic.jsp in web
browser , but tomcat gave me the following response:

HTTP Status 500 - 

type Exception report
message 
description The server encountered an internal error
() that prevented it from fulfilling this request.
exception 
javax.servlet.ServletException:
java.lang.OutOfMemoryError: Java heap space
		
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:274)
		
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause 
java.lang.OutOfMemoryError: Java heap space

note The full stack trace of the root cause is
available in the Apache Tomcat/6.0.10 logs.

I installed Tomcat 5.5.20 and did the same testing, I
could not produce this problem on tomcat 5.5.20.
Thanks.
Arden

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: apache-tomcat-6.0.10 OutOfMemoryError

Posted by prakash shanmugam <pr...@gmail.com>.
hi acec,
   have u got the solution for outof Memory error.




On 3/16/07, acec acec <to...@yahoo.ca> wrote:
>
> Hi, Prakash
> I just tested tomcat example jsp page, there is not
> any object to assign null.
> Thanks.
> Arden
> --- prakash shanmugam <pr...@gmail.com> wrote:
>
> > hi
> > i personally fell disabling the session in tomcat is
> > not the correct
> > solution to overcome the memory out of error. just
> > try to asign null for
> > unused objects. hope it resolve your issue.
> >
> > bye
> > with regards
> > prakash.s
> >
> >
> > On 3/13/07, acec acec < tomcatacec@yahoo.ca> wrote:
> > >
> > > Hi, Remy
> > > After I added <%@ page session="false" %> into
> > >
> >
> /apache-tomcat-6.0.10/webapps/examples/jsp/tagplugin/foreach.jsp
> > > , I could not reproduce OutOfMemoryError.
> > > But if I add <%@ page session="false" %> into my
> > > application, my jsp could not get information from
> > > session. How can I walk around this problem?
> > > Thanks.
> > > Arden
> > >
> > > --- Rémy Maucherat <re...@gmail.com>
> > wrote:
> > >
> > > > On 3/12/07, Filip Hanik - Dev Lists
> > > > <de...@hanik.com> wrote:
> > > > > add -XX:+HeapDumpOnOutOfMemoryError to your
> > > > JAVA_OPTS, then you can zip
> > > > > up the file that gets generated, make it
> > available
> > > > to us and I'll take a
> > > > > look at it
> > > >
> > > > Most likely it's because of session creation.
> > (you
> > > > should not be too
> > > > naive about problem reports, I think :D)
> > > >
> > > > -> Add <%@ page session="false" %> before
> > testing
> > > > the page, or make
> > > > the client send a cookie with the session id.
> > > >
> > > > Rémy
> > > >
> > > >
> > >
> >
> ---------------------------------------------------------------------
> > > > To start a new topic, e-mail:
> > > > users@tomcat.apache.org
> > > > To unsubscribe, e-mail:
> > > > users-unsubscribe@tomcat.apache.org
> > > > For additional commands, e-mail:
> > > > users-help@tomcat.apache.org
> > > >
> > > >
> > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Tired of spam?  Yahoo! Mail has the best spam
> > protection around
> > > http://mail.yahoo.com
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To start a new topic, e-mail:
> > users@tomcat.apache.org
> > > To unsubscribe, e-mail:
> > users-unsubscribe@tomcat.apache.org
> > > For additional commands, e-mail:
> > users-help@tomcat.apache.org
> > >
> > >
> >
> >
> > --
> > Thanks and Regards
> > S.Prakash
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Thanks and Regards
S.Prakash

Re: apache-tomcat-6.0.10 OutOfMemoryError

Posted by prakash shanmugam <pr...@gmail.com>.
hai christopher,


  What u said is correct running garbage collector is not a good practice
because it will slow down the application, can you suggest any other
alternative way to overcome the out of memory error.


On 3/16/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Prakash,
>
> prakash shanmugam wrote:
> > One more way to over memory.out.oferror is to run the garbage collector
> at
> > reasonable intervals.
>
> This is bad advice: the garbage collector will run itself at appropriate
> intervals. Also, there's no way to force garbage collection to occur.
> Lastly, putting GC calls in your code can lead you to believe that you
> are actually accomplishing something when you really aren't.
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFF+rCy9CaO5/Lv0PARAmL+AJ973q/0XiT816bBVpOL9YsQ3pbwMACbBT+f
> qix2yZKUYFKdQseUlxoDqS4=
> =bOjJ
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Thanks and Regards
S.Prakash

Re: apache-tomcat-6.0.10 OutOfMemoryError

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Prakash,

prakash shanmugam wrote:
> One more way to over memory.out.oferror is to run the garbage collector at
> reasonable intervals.

This is bad advice: the garbage collector will run itself at appropriate
intervals. Also, there's no way to force garbage collection to occur.
Lastly, putting GC calls in your code can lead you to believe that you
are actually accomplishing something when you really aren't.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF+rCy9CaO5/Lv0PARAmL+AJ973q/0XiT816bBVpOL9YsQ3pbwMACbBT+f
qix2yZKUYFKdQseUlxoDqS4=
=bOjJ
-----END PGP SIGNATURE-----

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


Re: apache-tomcat-6.0.10 OutOfMemoryError

Posted by prakash shanmugam <pr...@gmail.com>.
hi aces

i am giving this reply with hope that it wont be too childish, if it is
useful just enjoy it or else just ignore it

finally

                        {

                          try

                          {

                          System.out.println("inside finally");

                            if (rs != null)

{

rs.close();

rs=null;

}



                                    System.out.println("final");

                          } catch (SQLException
e){System.out.println("exception
in closing " + e.getMessage());

                          }



here rs is the object reference once the http request and response is over
there is no need for this object reference, so we can assign rs=null, the
basic logic behind this is rs.close() statement is not ready for garbage
collection, it will be available only when it is set to rs=null.



If the heap size reaches the maximum, garbage collector put in to action. In
some situation rs will not be reachable, if rs is put to null means it will
be easily  collected by the garbage collector.



One more way to over memory.out.oferror is to run the garbage collector at
reasonable intervals.





 bye

with regards

prakash.S





On 3/15/07, Caldarale, Charles R <Ch...@unisys.com> wrote:
>
> > From: Vinu Varghese [mailto:vinu@x-minds.org]
> > Subject: Re: apache-tomcat-6.0.10 OutOfMemoryError
> >
> >  Please check this
> > http://my.opera.com/karmazilla/blog/2007/03/13/good-riddance-p
> > ermgen-outofmemoryerror
>
> Unfortunately, the blogger is simply wrong in his premise that the
> default GC mechanism won't collect objects in the PermGen.  All Sun JVMs
> have always garbage collected unreachable class objects unless prevented
> by command line options.  It's only the relatively new concurrent GC
> implementation that does not, by default, free up dead classes; for
> that, you need the extra parameters as described in the blog.
>
> Enabling concurrent GC can have some side effects: it's less efficient,
> requiring more CPU cycles to get the job done, and requires more
> frequent, albeit very short, app pauses.  Whether it's better in your
> particular environment depends entirely on the requirements of that
> environment.
>
> - 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: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Thanks and Regards
S.Prakash

RE: apache-tomcat-6.0.10 OutOfMemoryError

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Vinu Varghese [mailto:vinu@x-minds.org] 
> Subject: Re: apache-tomcat-6.0.10 OutOfMemoryError
> 
>  Please check this 
> http://my.opera.com/karmazilla/blog/2007/03/13/good-riddance-p
> ermgen-outofmemoryerror

Unfortunately, the blogger is simply wrong in his premise that the
default GC mechanism won't collect objects in the PermGen.  All Sun JVMs
have always garbage collected unreachable class objects unless prevented
by command line options.  It's only the relatively new concurrent GC
implementation that does not, by default, free up dead classes; for
that, you need the extra parameters as described in the blog.

Enabling concurrent GC can have some side effects: it's less efficient,
requiring more CPU cycles to get the job done, and requires more
frequent, albeit very short, app pauses.  Whether it's better in your
particular environment depends entirely on the requirements of that
environment.

 - 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: apache-tomcat-6.0.10 OutOfMemoryError

Posted by Vinu Varghese <vi...@x-minds.org>.
Hi all

 Please check this 
http://my.opera.com/karmazilla/blog/2007/03/13/good-riddance-permgen-outofmemoryerror

regards
vinu

prakash shanmugam wrote:
> hi
> i personally fell disabling the session in tomcat is not the correct
> solution to overcome the memory out of error. just try to asign null for
> unused objects. hope it resolve your issue.
>
> bye
> with regards
> prakash.s
>
>
> On 3/13/07, acec acec <to...@yahoo.ca> wrote:
>>
>> Hi, Remy
>> After I added <%@ page session="false" %> into
>> /apache-tomcat-6.0.10/webapps/examples/jsp/tagplugin/foreach.jsp
>> , I could not reproduce OutOfMemoryError.
>> But if I add <%@ page session="false" %> into my
>> application, my jsp could not get information from
>> session. How can I walk around this problem?
>> Thanks.
>> Arden
>>
>> --- Rémy Maucherat <re...@gmail.com> wrote:
>>
>> > On 3/12/07, Filip Hanik - Dev Lists
>> > <de...@hanik.com> wrote:
>> > > add -XX:+HeapDumpOnOutOfMemoryError to your
>> > JAVA_OPTS, then you can zip
>> > > up the file that gets generated, make it available
>> > to us and I'll take a
>> > > look at it
>> >
>> > Most likely it's because of session creation. (you
>> > should not be too
>> > naive about problem reports, I think :D)
>> >
>> > -> Add <%@ page session="false" %> before testing
>> > the page, or make
>> > the client send a cookie with the session id.
>> >
>> > Rémy
>> >
>> >
>> ---------------------------------------------------------------------
>> > To start a new topic, e-mail:
>> > users@tomcat.apache.org
>> > To unsubscribe, e-mail:
>> > users-unsubscribe@tomcat.apache.org
>> > For additional commands, e-mail:
>> > users-help@tomcat.apache.org
>> >
>> >
>>
>>
>> __________________________________________________
>> Do You Yahoo!?
>> Tired of spam?  Yahoo! Mail has the best spam protection around
>> http://mail.yahoo.com
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>

-- 
........................................

Vinu Varghese
vinu@x-minds.org
www.x-minds.org
(Success always occurs in private, and failure in full view.)


Re: apache-tomcat-6.0.10 OutOfMemoryError

Posted by acec acec <to...@yahoo.ca>.
Hi, Prakash
I just tested tomcat example jsp page, there is not
any object to assign null.
Thanks.
Arden
--- prakash shanmugam <pr...@gmail.com> wrote:

> hi
> i personally fell disabling the session in tomcat is
> not the correct
> solution to overcome the memory out of error. just
> try to asign null for
> unused objects. hope it resolve your issue.
> 
> bye
> with regards
> prakash.s
> 
> 
> On 3/13/07, acec acec <to...@yahoo.ca> wrote:
> >
> > Hi, Remy
> > After I added <%@ page session="false" %> into
> >
>
/apache-tomcat-6.0.10/webapps/examples/jsp/tagplugin/foreach.jsp
> > , I could not reproduce OutOfMemoryError.
> > But if I add <%@ page session="false" %> into my
> > application, my jsp could not get information from
> > session. How can I walk around this problem?
> > Thanks.
> > Arden
> >
> > --- Rémy Maucherat <re...@gmail.com>
> wrote:
> >
> > > On 3/12/07, Filip Hanik - Dev Lists
> > > <de...@hanik.com> wrote:
> > > > add -XX:+HeapDumpOnOutOfMemoryError to your
> > > JAVA_OPTS, then you can zip
> > > > up the file that gets generated, make it
> available
> > > to us and I'll take a
> > > > look at it
> > >
> > > Most likely it's because of session creation.
> (you
> > > should not be too
> > > naive about problem reports, I think :D)
> > >
> > > -> Add <%@ page session="false" %> before
> testing
> > > the page, or make
> > > the client send a cookie with the session id.
> > >
> > > Rémy
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To start a new topic, e-mail:
> > > users@tomcat.apache.org
> > > To unsubscribe, e-mail:
> > > users-unsubscribe@tomcat.apache.org
> > > For additional commands, e-mail:
> > > users-help@tomcat.apache.org
> > >
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To start a new topic, e-mail:
> users@tomcat.apache.org
> > To unsubscribe, e-mail:
> users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail:
> users-help@tomcat.apache.org
> >
> >
> 
> 
> -- 
> Thanks and Regards
> S.Prakash
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: apache-tomcat-6.0.10 OutOfMemoryError

Posted by prakash shanmugam <pr...@gmail.com>.
hi
i personally fell disabling the session in tomcat is not the correct
solution to overcome the memory out of error. just try to asign null for
unused objects. hope it resolve your issue.

bye
with regards
prakash.s


On 3/13/07, acec acec <to...@yahoo.ca> wrote:
>
> Hi, Remy
> After I added <%@ page session="false" %> into
> /apache-tomcat-6.0.10/webapps/examples/jsp/tagplugin/foreach.jsp
> , I could not reproduce OutOfMemoryError.
> But if I add <%@ page session="false" %> into my
> application, my jsp could not get information from
> session. How can I walk around this problem?
> Thanks.
> Arden
>
> --- Rémy Maucherat <re...@gmail.com> wrote:
>
> > On 3/12/07, Filip Hanik - Dev Lists
> > <de...@hanik.com> wrote:
> > > add -XX:+HeapDumpOnOutOfMemoryError to your
> > JAVA_OPTS, then you can zip
> > > up the file that gets generated, make it available
> > to us and I'll take a
> > > look at it
> >
> > Most likely it's because of session creation. (you
> > should not be too
> > naive about problem reports, I think :D)
> >
> > -> Add <%@ page session="false" %> before testing
> > the page, or make
> > the client send a cookie with the session id.
> >
> > Rémy
> >
> >
> ---------------------------------------------------------------------
> > To start a new topic, e-mail:
> > users@tomcat.apache.org
> > To unsubscribe, e-mail:
> > users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail:
> > users-help@tomcat.apache.org
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Thanks and Regards
S.Prakash

Re: apache-tomcat-6.0.10 OutOfMemoryError

Posted by acec acec <to...@yahoo.ca>.
Hi, Remy
After I added <%@ page session="false" %> into
/apache-tomcat-6.0.10/webapps/examples/jsp/tagplugin/foreach.jsp
, I could not reproduce OutOfMemoryError.
But if I add <%@ page session="false" %> into my
application, my jsp could not get information from
session. How can I walk around this problem?
Thanks.
Arden

--- Rémy Maucherat <re...@gmail.com> wrote:

> On 3/12/07, Filip Hanik - Dev Lists
> <de...@hanik.com> wrote:
> > add -XX:+HeapDumpOnOutOfMemoryError to your
> JAVA_OPTS, then you can zip
> > up the file that gets generated, make it available
> to us and I'll take a
> > look at it
> 
> Most likely it's because of session creation. (you
> should not be too
> naive about problem reports, I think :D)
> 
> -> Add <%@ page session="false" %> before testing
> the page, or make
> the client send a cookie with the session id.
> 
> Rémy
> 
>
---------------------------------------------------------------------
> To start a new topic, e-mail:
> users@tomcat.apache.org
> To unsubscribe, e-mail:
> users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail:
> users-help@tomcat.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: apache-tomcat-6.0.10 OutOfMemoryError

Posted by Rémy Maucherat <re...@gmail.com>.
On 3/12/07, Filip Hanik - Dev Lists <de...@hanik.com> wrote:
> add -XX:+HeapDumpOnOutOfMemoryError to your JAVA_OPTS, then you can zip
> up the file that gets generated, make it available to us and I'll take a
> look at it

Most likely it's because of session creation. (you should not be too
naive about problem reports, I think :D)

-> Add <%@ page session="false" %> before testing the page, or make
the client send a cookie with the session id.

Rémy

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


Re: apache-tomcat-6.0.10 OutOfMemoryError

Posted by Martin Gainty <mg...@hotmail.com>.
in the meanwhile you can use jhat to analyze your heap results ..this comes with a nice browser interface to allow you to see heap usage by each class
http://java.sun.com/developer/technicalArticles/J2SE/monitoring/

you can also use JConsole to monitor the number of objects pending finalisation (same link)
http://java.sun.com/developer/technicalArticles/J2SE/monitoring/

M--
--------------------------------------------------------------------------- 
This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited.
--------------------------------------------------------------------------- 
Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire.
----- Original Message ----- 
From: "Filip Hanik - Dev Lists" <de...@hanik.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Monday, March 12, 2007 4:16 PM
Subject: Re: apache-tomcat-6.0.10 OutOfMemoryError


> add -XX:+HeapDumpOnOutOfMemoryError to your JAVA_OPTS, then you can zip 
> up the file that gets generated, make it available to us and I'll take a 
> look at it
> 
> Filip
> 
> acec acec wrote:
>> Hi,
>> I tested tomcat 6.0.10 using jmeter. I found the
>> following problem.
>>
>> I defined three thread groups:
>> ============================First
>> thread-group============================
>> thread Properties:
>>   Number of Threads(users): 50
>>   Ramp-Up Period(in seconds): 10
>>   Loop Count: 1000
>>
>> HTTP Request
>>   path: /examples/servlets/servlet/HelloWorldExample
>>
>> Constant Timer
>>   Thread Delay (in milliseconds): 10
>>
>> ============================Second
>> thread-group============================
>> thread Properties:
>>   Number of Threads(users): 50
>>   Ramp-Up Period(in seconds): 10
>>   Loop Count: 1000
>>
>> HTTP Request
>>   path: /examples/jsp/tagplugin/foreach.jsp
>>
>> Constant Timer
>>   Thread Delay (in milliseconds): 10
>>
>> ============================Third
>> thread-group============================
>> thread Properties:
>>   Number of Threads(users): 1
>>   Ramp-Up Period(in seconds): 1
>>   Loop Count: 1000
>>
>> HTTP Request
>>   path: /manager/status
>>   Send parameter with request: XML(Name) true(Value)
>>
>> Constant Timer
>>   Thread Delay (in milliseconds): 1000
>> ===========================================================================
>>
>> I found tomcat 6.0.10 will use 100% CPU in a few
>> minutes, then I stop sending http request in jmeter.
>> After that, I accessed another jsp page:
>> /examples/jsp/jsp2/el/basic-arithmetic.jsp in web
>> browser , but tomcat gave me the following response:
>>
>> HTTP Status 500 - 
>>
>> type Exception report
>> message 
>> description The server encountered an internal error
>> () that prevented it from fulfilling this request.
>> exception 
>> javax.servlet.ServletException:
>> java.lang.OutOfMemoryError: Java heap space
>> 
>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:274)
>> 
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>
>> root cause 
>> java.lang.OutOfMemoryError: Java heap space
>>
>> note The full stack trace of the root cause is
>> available in the Apache Tomcat/6.0.10 logs.
>>
>> I installed Tomcat 5.5.20 and did the same testing, I
>> could not produce this problem on tomcat 5.5.20.
>> Thanks.
>> Arden
>>
>> __________________________________________________
>> Do You Yahoo!?
>> Tired of spam?  Yahoo! Mail has the best spam protection around 
>> http://mail.yahoo.com 
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>   
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
>

Re: apache-tomcat-6.0.10 OutOfMemoryError

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
add -XX:+HeapDumpOnOutOfMemoryError to your JAVA_OPTS, then you can zip 
up the file that gets generated, make it available to us and I'll take a 
look at it

Filip

acec acec wrote:
> Hi,
> I tested tomcat 6.0.10 using jmeter. I found the
> following problem.
>
> I defined three thread groups:
> ============================First
> thread-group============================
> thread Properties:
>   Number of Threads(users): 50
>   Ramp-Up Period(in seconds): 10
>   Loop Count: 1000
>
> HTTP Request
>   path: /examples/servlets/servlet/HelloWorldExample
>
> Constant Timer
>   Thread Delay (in milliseconds): 10
>
> ============================Second
> thread-group============================
> thread Properties:
>   Number of Threads(users): 50
>   Ramp-Up Period(in seconds): 10
>   Loop Count: 1000
>
> HTTP Request
>   path: /examples/jsp/tagplugin/foreach.jsp
>
> Constant Timer
>   Thread Delay (in milliseconds): 10
>
> ============================Third
> thread-group============================
> thread Properties:
>   Number of Threads(users): 1
>   Ramp-Up Period(in seconds): 1
>   Loop Count: 1000
>
> HTTP Request
>   path: /manager/status
>   Send parameter with request: XML(Name) true(Value)
>
> Constant Timer
>   Thread Delay (in milliseconds): 1000
> ===========================================================================
>
> I found tomcat 6.0.10 will use 100% CPU in a few
> minutes, then I stop sending http request in jmeter.
> After that, I accessed another jsp page:
> /examples/jsp/jsp2/el/basic-arithmetic.jsp in web
> browser , but tomcat gave me the following response:
>
> HTTP Status 500 - 
>
> type Exception report
> message 
> description The server encountered an internal error
> () that prevented it from fulfilling this request.
> exception 
> javax.servlet.ServletException:
> java.lang.OutOfMemoryError: Java heap space
> 		
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:274)
> 		
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
> root cause 
> java.lang.OutOfMemoryError: Java heap space
>
> note The full stack trace of the root cause is
> available in the Apache Tomcat/6.0.10 logs.
>
> I installed Tomcat 5.5.20 and did the same testing, I
> could not produce this problem on tomcat 5.5.20.
> Thanks.
> Arden
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>   


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