tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clemens, Michael" <Michael.Clem...@epos-cs.de>
Subject AW: Memory blowup and performance problems
Date Wed, 19 Jun 2002 15:11:58 GMT
thanks a lot, i will try this

-----Urspr√ľngliche Nachricht-----
Von: Chris Newland [mailto:chris.newland@emorphia.com]
Gesendet: Mittwoch, 19. Juni 2002 17:18
An: Tomcat Users List
Betreff: RE: Memory blowup and performance problems


Hi Michael,

It sounds like there is a serious problem if 20 requests can consume 500MB
of memory :(

I have found that a good method of tracing memory leaks is to create a page
that shows the JVM memory usage and to refresh this page before and after
you view each page you are testing.

I use Cocoon, so I have an XSP page for this but I imagine is it quite easy
to do in JSP too.

My page uses the following lines of code:

--------------------------------------------------------
Runtime runtime = Runtime.getRuntime();

long total = runtime.totalMemory() / (1024 * 1024);
long free  = runtime.freeMemory() / (1024 * 1024);
long used  = total - free;

Used <xsp:expr>used</xsp:expr>M
Free <xsp:expr>free</xsp:expr>M
Total <xsp:expr>total</xsp:expr>M
--------------------------------------------------------

<xsp:expr> is an XSP tag so you will have to find the JSP equivalent (I'm
not familiar with JSP).

Create a JSP page and then refresh the memory viewing page in your browser
before and after each page. This will allow you to find out how much memory
each request is consuming, and will allow you to view the size of the VM
heap as it grows.

Hope this helps,

Chris


> -----Original Message-----
> From: Clemens, Michael [mailto:Michael.Clemens@epos-cs.de]
> Sent: 19 June 2002 15:32
> To: Tomcat Users List
> Subject: AW: Memory blowup and performance problems
>
>
> Hi again,
>
> thanks for your fast answer!
> I'm using tomcat 4.03 with apache 1.3 (mod_jk). i have a bigger web
> application
> with jsp's and servlets. my jdk is 1.4.0_01. the box is in
> testing phase, so
> there are
> 10 to 20 requests per day and no more users than 2 at on time.
>
> michael
>
> -----Urspr√ľngliche Nachricht-----
> Von: Chris Newland [mailto:chris.newland@emorphia.com]
> Gesendet: Mittwoch, 19. Juni 2002 16:36
> An: Tomcat Users List
> Betreff: RE: Memory blowup and performance problems
>
>
> Hi Michael,
>
> Can you tell me how many requests you are receiving in a day?
>
> Do these requests each result in a JSP compilation? There is a
> known memory
> leak in the javac compiler so this may be the problem.
>
> How are you using Tomcat? Servlets? JSP? Cocoon?
>
> Best Regards,
>
> Chris
>
> > -----Original Message-----
> > From: Clemens, Michael [mailto:Michael.Clemens@epos-cs.de]
> > Sent: 19 June 2002 14:57
> > To: tomcat-user@jakarta.apache.org
> > Subject: Memory blowup and performance problems
> >
> >
> > hi,
> >
> > i have a problem with running tomcat 4.03 on my linux box.
> after starting
> > tomcat, java takes nearly all my memory (~500megs) until theres
> > no more. for
> > this it needs about 1 day. now tomcat needs about 1 to 2
> minutes to react,
> > escecially after leaving him alone for a few hours. memory is
> never given
> > back to the system by him.
> >
> > michael
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:tomcat-user-help@jakarta.apache.org>
> >
> >
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:tomcat-user-help@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>



--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message