RE: JSP and memory leaks
"Artem Orlov" <[email protected]> Tue, 11 May 2004 18:17:09 +0500
| Newsgroups | gmane.comp.java.jpublish.devel |
|---|---|
| Message-ID | <[email protected]> |
Dear Anthony, Sorry, but I can't understand for what goals can I use JSP since Version 3.0b2? If now JSP is being dispatched to org.jpublish.servlet.JPublishServlet as a kind of resource can it be included (parsed/executed) into Velocity template using existing repository or custom org.jpublish.Repository implementation? About the memory leaks: it can be demonstrated with "jpublish-demo.war" application, included into release 3.0b1. The actions with application are: 1. Navigate through demo site 2. Reload application using Tomcat Web Application Manager 3. Repeat steps 1-2 until crash =) May be the error ensues from running tomcat at Win32 machine... Piece of Tomcat 5.0.19 log is listed below: ... 2004-05-11 17:46:30 StandardContext[/manager]HTMLManager: restart: Reloading web application at '/jpublish-demo' 2004-05-11 17:46:34 StandardContext[/manager]HTMLManager: list: Listing contexts for virtual host 'localhost' 2004-05-11 17:46:38 StandardContext[/manager]HTMLManager: restart: Reloading web application at '/jpublish-demo' 2004-05-11 17:46:43 StandardContext[/manager]HTMLManager: list: Listing contexts for virtual host 'localhost' 2004-05-11 17:46:57 StandardContext[/manager]HTMLManager: restart: Reloading web application at '/jpublish-demo' 2004-05-11 17:47:07 StandardContext[/jpublish-demo]Servlet /jpublish-demo threw load() exception javax.servlet.ServletException at org.jpublish.servlet.JPublishServlet.init(JPublishServlet.java:121) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:10 44) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:887) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java: 3959) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4284) at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2990) at org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:1019) at org.apache.catalina.manager.HTMLManagerServlet.reload(HTMLManagerServlet.jav a:524) at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java :147) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext Valve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:587) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:732) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:619) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:688) at java.lang.Thread.run(Thread.java:534) ----- Root Cause ----- java.lang.OutOfMemoryError 2004-05-11 17:47:07 StandardContext[/manager]HTMLManager: list: Listing contexts for virtual host 'localhost' 2004-05-11 17:47:13 StandardWrapperValve[jpublish]: Allocate exception for servlet jpublish javax.servlet.ServletException at org.jpublish.servlet.JPublishServlet.init(JPublishServlet.java:121) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:10 44) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:712) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:187) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext Valve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:732) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:619) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:688) at java.lang.Thread.run(Thread.java:534) ----- Root Cause ----- java.lang.OutOfMemoryError ... Sincerely, Artem Orlov > -----Original Message----- > From: [email protected] [mailto:jpublish- > [email protected]] On Behalf Of Anthony Eden > Sent: Tuesday, May 11, 2004 5:30 PM > To: [email protected] > Subject: Re: [JPublish-developer] JSP and memory leaks > > Artem, > > Version 3.0b2 includes a first attempt to allow the use of JSP or other > non-JPublish resources through the use of the new > org.jpublish.servlet.PathDispatcher class as well as some new code in > the org.jpublish.servlet.JPublishServlet class. Currently the code > dispatches code to the servlet engine, however this same technique will > eventually be applied at the view layer thus allowing JPublish to > execute the initial processing prior to delegating to JSP for the view. > I'll implement this at some point unless someone else does it first. ;-) > > As for memory leaks, it is possible that there are leaks, although I > have been testing a site under significant load, with BeanShell scripts > for the actions, and while not yet as performant as I would like I have > yet to see memory leaks. However I will continue to do testing and will > try and recreate the scenerio you mention below and see if I can > determine what is causing the problem. Is the application being tested > one of the examples which comes with JPublish or is it your own > application? > > If anyone else has suggestions or ideas on what, if anything, might be > causing memory leaks please let me know so I can put in a fix immediately. > > Sincerely, > Anthony Eden > > Artem Orlov wrote: > > > Hello, > > > > I have two questions: > > > > 1. Can I use JSP pages and JSTL for my "View" part? May be somebody > > has such ViewRenderer already? Is it planned to include > > ViewRenderer for JSP (with support of taglibs) in future > > releases of JPublish? > > 2. I guess that there are some memory leaks in JPubluish framework. > > I have Tomcat 5.0.19 and JPublish 3.0b1. After a number of > > restarting application through "Tomcat Web Application Manager" > > server crashes with not enough of free memory message. In the > > case of regular navigation through the site (with reloading the > > pages) the java allocated memory does not begin to grow so > rapidly. > > > > Artem > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by Sleepycat Software > Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to > deliver higher performing products faster, at low TCO. > http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 > _______________________________________________ > Jpublish-developer mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jpublish-developer ------------------------------------------------------- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3