> From: "Wendy Smoak" <[EMAIL PROTECTED]>
> Sent: Wednesday, May 11, 2005 10:42 AM
Subject: Memory for JSP Compliation in 4.1


> Will adding
>    JAVA_OPTS=-Xmx128M
> to catalina.sh help with running out of memory during JSP compilation in
> 4.1?
>
> The notes in catalina.sh say that these options will be used when the
> "start" "stop" or "run" command is executed, but from the Jasper config
> page, I see that Tomcat will 'fork' another JVM in order to compile JSPs.
> Does this new JVM "inherit" the memory settings of the original, or is
there
> some other way to increase its memory?

First off, no, the -Xmx option will do nothing in terms of affecting the
memory for a JSP compile if fork is true.

If fork is false, then the -Xmx options that you ran your original Tomcat
with WILL affect the heap size for the compiler, but that assumes the Sun
compiler. I don't know if HP's JVM is using Suns compiler or not (it may
be). See, the Sun compiler is just a java class that can run like any other
class. But if HPs JVM doesn't have the Sun compiler class available, then
the JSP compiler is simply going to call javac, and that's going to fork no
matter what your Jasper setting.

Also note that at some point in the 4.1 version, the JSP/Sun compiler combo
had a memory leak. I don't know if that was Tomcat, Jasper, or Suns compiler
that was at fault, or whether your version has it fixed, but that was an
early impetus for forking to compile JSPs in the first place, to punt around
the memory leak.

Um...how big is the JSP that you're compiling? Is there perhaps a way to
make it smaller? Perhaps including some of the static content at runtime
rather than compile? (I'm trying to fathom a big enough JSP that would blow
up the compiler, but who knows.)

Have you considered looking at precompiling the JSPs (or at least the few
nasty ones that are grenading your server)? Then you'd perhaps have more
control over memory for the compile that the standard Jasper engine doesn't
expose to you.

Regards,

Will Hartung
([EMAIL PROTECTED])




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

Reply via email to