tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Löffelhardt <>
Subject Re: reducing tomcat & jasper memory footprint
Date Tue, 31 Dec 2002 00:55:23 GMT

My problem isin't javac memory leakes. Due to the apache/tomcat
documentation I was  aware of this an setup jikes as my jsp compiler. I'm
also using JDK 1.4.1 so the javac issues should be solved, nonetheless.
The main problem is as follows:
1. Every article & every page in general is a jsp page
2. All the pages are generated by a legacy CMS-System (imperia) and I can't
change the structure of it's works.
3. Every jsp page, once loaded, consumes memory, since the class remains
4. We have 1000s of pages , every day some 200-300 new, so memory use

The way we use jsp's for a cms is faulty. But I can't do anything about
Increasing permSize of the JVM helps a lot. Maybe it would be a good idea to
include some hints about -XX:MaxPermSize and XX:PermSize into the
documentation because it really helps lessen the problems.
Is there any generic way to get a stable tomcat with huge number of jsp's ?

Thanks for all ya feedback & llap + happy new year...


----- Original Message -----
From: "Remy Maucherat" <>
To: "Tomcat Users List" <>
Sent: Monday, December 30, 2002 9:40 PM
Subject: Re: reducing tomcat & jasper memory footprint

> Paul Yunusov wrote:
> > On Monday 30 December 2002 02:37 pm, Julian Löffelhardt wrote:
> >
> >>Hi,
> >>
> >>I'm using Apache 1.3.26 and 3 tomcat 4.0.4 instances with AJP13 &
> >>loadbalancing . Our application is a CMS where all the published
> >>are generated offline as JSP-Files, one jsp per article.
> >>
> >>We had hige problems with the memory footprint. Due to the fact that
> >>jsp is generated as a class and there are about 200 new artices per day
> >>permanent segment of the JVM heap gets filled with all the classes, and
> >>get an OutOfMemoryError. My workaround for now is setting -XX:PermSize
> >>--XX:MapPermSize to higher values, but this just delays application
> >>hang-up.
> >>
> >>With 64 megs of permSize our Server had an approx. uptime of 1 day now
> >>about 3-4 days.
> >>
> >>Is there any way to unload jsp-Files (unload the class) ?
> >>
> >>llap,
> >>julian
> >
> >
> > JAVAC leaks memory every time a JSP class is compiled. The more JSPs are
> > compiled or the more often JSP classes are compiled, the more memory is
> > leaked. You exacerbate this problem by generating a JSP per article
> >
> > IMHO, generating a JSP per article is misusing the technology. JSP is a
> > templating solution whereas one JSP describes a layout of any number of
> > documents. I suggest you change your software to generate an HTML file
> > artcile rather than a JSP.
> Maybe it's abusing the technology, but it really should work fine.
> Workarounds for the problem include using jikes, or using javac out of
> process (I don't quite remember how it is configured; since Jasper 2
> uses Ant javac task to compile, it should be in the Ant docs on the
> javac task).
> Remy
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message