tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Layman <randy.lay...@aswethink.com>
Subject RE: Serious memory leak w/JSP pages?
Date Wed, 23 Jan 2002 15:11:56 GMT

	Just a guess, but how much memory are you using, how much are you
putting into each session, and what is the session timeout set to?
Generally load testing applications don't support cookies so you get a new
session for each connection, creating some new memory structures that aren't
freed until the session timeout (defaults to 30 minutes).  

	Tomcat out of the box doesn't modify the maximum Java Heap size
(unlike most other application servers).  The default value is 64M, which is
pretty small for a server based application.  Increasing this will increase
the amount of memory available.

	Randy

> -----Original Message-----
> From: Michael Molloy [mailto:mmncycles@yahoo.com]
> Sent: Wednesday, January 23, 2002 10:49 AM
> To: tomcat-user@jakarta.apache.org
> Subject: Serious memory leak w/JSP pages?
> 
> 
> Testing Tomcat 3.3a on Mandrake 8.1 with Sun JDK
> 1.3.1_02. 450 MHz Celeron w/192 MB RAM. Tried the same
> test with 4.0.1 with the same results.
> 
> There appears to be a memory leak when calling JSPs.
> For example, I start Tomcat standalone and use JMeter
> on a different machine to create 50 threads calling a
> JSP that simply prints out some environment
> information. After about 45 minutes, Tomcat runs out
> of memory & stops accepting connections.
> 
> A servlet that uses a PrintWriter to print the same
> information out to the calling browser can run
> indefinitely with no appreciable increase in memory
> consumption.
> 
> I have had the same result with other servlets & JSPs
> as well, and on Windows 2000 Server, also. 
> 
> Does anyone have any suggestions for fixing this?
> Setting a page directive with session="false" seems to
> prevent the memory leak, but we need to use sessions
> in our application.
> 
> I wonder if I'm missing something. I tried the
> identical JSP under Resin, and it ran for hours
> without any increase in memory. If Tomcat can't serve
> JSPs for an hour under a moderate load without running
> out of memory, that seems to be a pretty big issue.
> Again, I hope I've missed something important that
> will fix this.
> 
> --Michael
> 
> __________________________________________________
> Do You Yahoo!?
> Send FREE video emails in Yahoo! Mail!
> http://promo.yahoo.com/videomail/
> 
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
> 

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message