Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 59895 invoked from network); 27 May 2005 13:32:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 May 2005 13:32:57 -0000 Received: (qmail 26888 invoked by uid 500); 27 May 2005 13:32:30 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 26878 invoked by uid 500); 27 May 2005 13:32:30 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 26863 invoked by uid 99); 27 May 2005 13:32:29 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from mail.zooplus.de (HELO mail.zooplus.de) (212.18.25.230) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 27 May 2005 06:32:26 -0700 Received: from exchange2.home.zooplus.de (unknown [192.168.10.72]) by mail.zooplus.de (Postfix) with ESMTP id A6B8357665 for ; Fri, 27 May 2005 15:32:04 +0200 (CEST) Received: by exchange2.home.zooplus.de with Internet Mail Service (5.5.2657.72) id ; Fri, 27 May 2005 15:32:04 +0200 Message-ID: <10361639FF4CA04ABB30F54683E4FB85020B11EB@exchange2.home.zooplus.de> From: Bernhard Slominski To: 'Tomcat Users List' Subject: AW: jspServlet runs out of memory while compiling some jsp files using fork=true Date: Fri, 27 May 2005 15:32:04 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Well the precompliation is quite simple: You use an ant jasper task to make the java file from your jsp and then compile these classes. Then you do a mapping from the jsp to the class. This is all done on a separate machine, I do the deployment as war = file, which is copied accross to the live machine. It can all be done automatically. Look at = http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html I post you the code from my buildfile. The only thing is that you have to reload your app when you do this, so = that might be a problem for you. =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 ]]> =20 > -----Urspr=FCngliche Nachricht----- > Von: Vesa Varimo [mailto:vesa.varimo@jippii.com] > Gesendet: Freitag, 27. Mai 2005 15:16 > An: Tomcat Users List > Betreff: Re: jspServlet runs out of memory while compiling some jsp > files using fork=3Dtrue >=20 >=20 >=20 > Hmh.. how does you deployment script work? Do you compile jsp=20 > pages in some=20 > other server than the live server? >=20 > Well, I didn't write those pages :), I just have to live with=20 > legacy code :D >=20 >=20 > Vesa >=20 > ----- Original Message -----=20 > From: "Bernhard Slominski" > To: "'Tomcat Users List'" > Sent: Friday, May 27, 2005 4:02 PM > Subject: AW: jspServlet runs out of memory while compiling=20 > some jsp files=20 > using fork=3Dtrue >=20 >=20 > Hi, >=20 > I think it happens randomly because it depends on the actual=20 > load on the > server. > Where there is not much traffic it's OK, but with more=20 > traffic the server > runs out of memomry. > I see your point that you cannot "control" the webmasters. > But still with the problems you have and the obvious very big=20 > application > with 10000 lines in a JSP (this must we a horror to maintain=20 > the code) and > hundreds of jars you should have a proper deployment process=20 > and not just > copying JSPs across. > It does not mean that it's more complicated, I implemented this in my > company with an ant script and it's really simple, stable and=20 > secure. Nobody > want's to go back to the old copy "solution". >=20 > Cheers >=20 > Bernhard >=20 > > -----Urspr=FCngliche Nachricht----- > > Von: Vesa Varimo [mailto:vesa.varimo@jippii.com] > > Gesendet: Freitag, 27. Mai 2005 14:59 > > An: Tomcat Users List > > Betreff: Re: jspServlet runs out of memory while compiling some jsp > > files using fork=3Dtrue > > > > > > > > Hi, > > > > no the webapp is running whole time without redeployments. > > The jsp pages are quite large, 5000-10000 rows and there are > > many of them. > > Can this affect to memory usage of javac compiler? > > This is a strange problem, because sometimes these same pages > > compile just > > fine, sometimes they don't. > > > > > > Thx, > > > > Vesa > > > > ----- Original Message -----=20 > > From: "Steve Kirk" > > To: "'Tomcat Users List'" > > Sent: Friday, May 27, 2005 3:32 PM > > Subject: RE: jspServlet runs out of memory while compiling > > some jsp files > > using fork=3Dtrue > > > > > > Is the problem caused because you redeploy the whole webapp=20 > each time? > > Could you just deploy only those files that have changed? I > > can't imagine > > that this leads to overloading unless the numbers are massive...? > > > > > -----Original Message----- > > > From: Vesa Varimo [mailto:vesa.varimo@jippii.com] > > > Sent: Friday 27 May 2005 13:34 > > > To: Tomcat Users List > > > Subject: Re: jspServlet runs out of memory while compiling > > > some jsp files using fork=3Dtrue > > > > > > > > > > > > Yes, that would be one solution, but not suitable for our > > > case because our > > > webmasters are constantly updating jsp pages on our > > > production servers. > > > Btw. I'm using tomcat 5.0.28. > > > > > > Thx, > > > > > > Vesa > > > > > > ----- Original Message -----=20 > > > From: "Bernhard Slominski" > > > To: "'Tomcat Users List'" > > > Sent: Friday, May 27, 2005 3:25 PM > > > Subject: AW: jspServlet runs out of memory while compiling > > > some jsp files > > > using fork=3Dtrue > > > > > > > > > Hi, > > > > > > I would suggest that you do a precompilation of your jsps on > > > a deployment > > > machine which is separate from the live machine. > > > So your compilation is not done on the live server, which > > > might be on heavy > > > load. > > > Also you don't have the problem that the first visitor has to > > > wait an awful > > > long time until the page get's displayed. > > > > > > Cheers > > > > > > Bernhard > > > > > > > -----Urspr=FCngliche Nachricht----- > > > > Von: Vesa Varimo [mailto:vesa.varimo@jippii.com] > > > > Gesendet: Freitag, 27. Mai 2005 12:45 > > > > An: tomcat-user@jakarta.apache.org > > > > Betreff: jspServlet runs out of memory while compiling some > > > jsp files > > > > using fork=3Dtrue > > > > > > > > > > > > Hi, > > > > > > > > I'm having OutOfMemory error while Tomcat tries to compile > > > > jsp files. The problem occures few times in day so it's quite > > > > hard to repeat. > > > > Tomcat is configured to run javac in separate JVM with > > > > fork=3Dtrue option. I tried to give more memory for ant using > > > > ANT_OPTS, but it didn't help. > > > > I read source code for the jasper compiler and there are > > > > variables that configure how much memory is given to ant, but > > > > I'm not able to configure them > > > > with jspServlet init parameters. > > > > > > > > How should I resolved this? Is the Jikes compiler a solution > > > > worth of trying? > > > > > > > > Stacktrace included below. I have hundreds of jars in > > > > classpath... so I can't paste the whole compiler output. > > > > > > > > BR, > > > > > > > > Vesa Varimo > > > > vesa.varimo@jippii.com > > > > > > > > -------------------------------------------------------------- > > > > ------------------ > > > > > > > > 2005-05-26 21:42:53 StandardWrapperValve[jsp]: > > > > Servlet.service() for servlet jsp threw exception > > > > java.lang.OutOfMemoryError > > > > > > > > May 7, 2005 12:21:42 PM org.apache.jasper.compiler.Compiler > > > > generateClass > > > > SEVERE: Javac exception > > > > Compile failed; see the compiler error output for details. > > > > at > > > org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:944) > > > > at > > > org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764) > > > > at > > > > > > = org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:379) > > > > at > > > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:472) > > > > at > > > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:451) > > > > at > > > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) > > > > at > > > > org.apache.jasper.JspCompilationContext.compile(JspCompilation > > > > Context.java:511) > > > > at > > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServlet > > > > Wrapper.java:295) > > > > at > > > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet > > > > .java:292) > > > > at > > > >=20 > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) > > > > at > > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > > > at > > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilt > > > > er(ApplicationFilterChain.java:237) > > > > at > > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli > > > > cationFilterChain.java:157) > > > > at > > > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardW > > > > rapperValve.java:214) > > > > > > > > > > > >=20 > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: = tomcat-user-unsubscribe@jakarta.apache.org > > > For additional commands, e-mail:=20 > tomcat-user-help@jakarta.apache.org > > > > > > > > > > > > > >=20 > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: = tomcat-user-unsubscribe@jakarta.apache.org > > > For additional commands, e-mail:=20 > tomcat-user-help@jakarta.apache.org > > > > > > > > > > > > > >=20 > --------------------------------------------------------------------- > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: = tomcat-user-help@jakarta.apache.org > > > > > > > >=20 > --------------------------------------------------------------------- > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: = tomcat-user-help@jakarta.apache.org > > >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org >=20 >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org