You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Randy Layman <ra...@aswethink.com> on 2001/04/19 14:08:28 UTC

RE: tomcat(3.2.1 or 3.2.2 beta3) stops because of java.lang.OutOf MemoryError!!!

	I don't believe that this is a Tomcat bug.  I haven't seen any
memory leaks in my usage and no one else has reported anything that didn't
turn out to be their application.

	Its common for developers who don't fully understand the Servlet
lifecycle to create memory leaks.  You need to remember that sessions stay
around after the user leaves - until the timeout if its set or forever if
you've disabled the timeout.  Also member variables of servlets stay around
for long periods of time.  Using Collections (Maps, Sets, and Lists) without
clearing them can consume increasing amounts of memory.  Keeping
Input/Output streams open also consumes memory is they use a Buffered
stream.  There are other ways of leaking memory, but these seem to be the
most common.  You also need to remember that with concurrent requests you
will end up using more memory than with a single request.

	Randy

> -----Original Message-----
> From: Kim Jong Tae [mailto:dejavu@bora.dacom.co.kr]
> Sent: Thursday, April 19, 2001 8:35 AM
> To: tomcat-user@jakarta.apache.org
> Subject: tomcat(3.2.1 or 3.2.2 beta3) stops because of
> java.lang.OutOfMemoryError!!!
> 
> 
> 
> hi all.
> I use tomcat 3.2.1 and 3.2.2.beta3.
> I increase java heap size but increasing heap size may not solve
> outofmemory problem!
> 
> Is the bug tomcat server? Any patch need?
> 
> All tomcats stop. below is server log. 
> 
>    at java.lang.Throwable.fillInStackTrace(Native Method)
>     at java.lang.Throwable.fillInStackTrace(Compiled Code)
>     at java.lang.Throwable.<init>(Compiled Code)
>     at java.lang.Exception.<init>(Compiled Code)
>     at 
> javax.servlet.ServletException.<init>(ServletException.java:161)
>     at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
>     at javax.servlet.http.HttpServlet.service(Compiled Code)
>     at org.apache.tomcat.core.ServletWrapper.doService(Compiled Code)
>     at org.apache.tomcat.core.Handler.service(Compiled Code)
>     at org.apache.tomcat.core.ServletWrapper.service(Compiled Code)
>     at org.apache.tomcat.core.ContextManager.internalService(Compiled
> Code)
>     at org.apache.tomcat.core.ContextManager.service(Compiled Code)
>     at
> org.apache.tomcat.service.connector.Ajp12ConnectionHandler.pro
> cessConnect
> ion(Compiled Code)
>     at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code)
>     at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled
> Code)
>     at java.lang.Thread.run(Compiled Code)
> Root cause:
> java.lang.OutOfMemoryError
> 
> 
> thank you!
> 
> 	#################################################
> 	#				Jongtae Kim             
>         # 
> 	#   Tel +82 2 2220-7284 Fax: +82 2 2220-7219      #
> 	#   E-mail : dejavu@bora.dacom.co.kr            #
> 	#   Internet Service Team Chollian Online Unit  #
> 	#################################################
>