you can also use jmeter for this purpose i have not used it but i heard that
it help in detecting memory leaks in tomcat.JMeter is also under jakarta
project you can use it may be it will help you
        sachin

-----Original Message-----
From: Aditya [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 6:55 AM
To: Tomcat Developers List
Subject: Re: tracking memory usage over time


Glenn,

several months ago you had posted a URL to a document (at
kinetic.more.net if I remember correctly) where you talked about
having to restart your production Tomcat(s) every 4 weeks or so due to
Heap exhaustion. Is that still the case? If so what causes the heap
exhaustion?

We've looked high and low, with JProbe etc, and we still can't find
where the "leak" is. We're having to restart a Tomcat (4.1.20) with
-Xms and -Xmx both set to 256M every 4 days or so.

Thanks,
Adi

> On Fri, 14 Feb 2003 06:45:26 -0600, Glenn Nielsen <[EMAIL PROTECTED]>
said:
> An easier way to measure memory usage in production is to start the
> JVM which runs Tomcat with the arg -verbose:gc, this will print
> information to stdout about each garbage collection and the memory
> used.

> I doubt if the memory leak is in Tomcat itself.  The best way to
> find the memory leak in your application is to setup a test server
> and use OptimizeIt or JProbe to profile Tomcat and your web
> application.  You can use something like JMeter to simulate load.

> Regards,

> Glenn


> Aditya wrote: I have the following JSP that I hit every 5 minutes
> and stuff the returned values into a RRD (www.rrdtool.org) to
> measure the memory (heap I presume) consumption of Tomcat over
> time. Is there a "better" way, short of using JMX in the newer
> Tomcat builds, of doing this?  <%@ page language="java" %> <%@ page
> session="false" %> <% long free =
> java.lang.Runtime.getRuntime().freeMemory(); long total =
> java.lang.Runtime.getRuntime().totalMemory(); out.print(free + "|" +
> total + "|"); %> I can see a clear leak (about 20 contexts with a
> dozen or so hit constantly and recompiling JSPs very often) which
> necessitates (-Xmx and -Xms set to 256 MB) a restart of Tomcat every
> 4 days or so (with 4.1.14). I just upgraded to 4.1.20 thinking that
> the constant compiling was the source of the leak and that doesn't
> seem to have made a difference. Running 4.1.14 under jprobe doesn't
> evidence any leaks in our JSPs/filters.  Hints on how to trace this
> leak down would be most welcome.  Thanks, Adi
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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



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

Reply via email to