tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin A. Burton" <>
Subject OutOfMemory errors compiling JSPs on 5.0.16 and 5.5.4
Date Sat, 13 Nov 2004 01:17:28 GMT
I'm having a terrible time trying to get my JSPs compiled on Tomcat.

We started having OutOfMemory problems a while back and I've tracked it 
down to JSP compilation.

Here's what I can do to replicate the problem:

- shutdown tomcat
- remove the work directory
- startup tomcat
- For all my JSPs I fetch them with the URL foo.jsp?jsp_precompile=true 
to trigger precompilation

After about 10 minutes (and 50-100 JSP files) Tomcat will fail with:

SEVERE: Servlet.service() for servlet jsp threw exception

Note that the VM still shows plenty of memory so I'm not sure what the 
heck is going on here.  I also looked at our file handles and they seem 
fine too.

I've followed all suggestions I've found via Google including:

- setting fork to true
- using jikes
- Migrating to Tomcat 5.5.4 to use jdtool.

The machine has PLENTY of memory available:

export JAVA_OPTS="-server -Xmx1280M -Xms512M -Djava.awt.headless=true"

Any suggestions would be appreciated.

We're probably going to migrate to using the command line JspC compiler 
to build all our JSPs before hand so the webapp doesn't need to compile 
them at runtime but this seems like a cheap workaround.  I'd rather 
Tomcat weren't broken in this regard.



Use Rojo (RSS/Atom aggregator).  Visit Ask me for an 
invite!  Also see #rojo if you want to chat.

Rojo is Hiring! -

If you're interested in RSS, Weblogs, Social Networking, etc... then you 
should work for Rojo!  If you recommend someone and we hire them you'll 
get a free iPod!
Kevin A. Burton, Location - San Francisco, CA
       AIM/YIM - sfburtonator,  Web -
GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412

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

View raw message