Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

out of memory error

Status
Not open for further replies.

bthale

Programmer
Oct 31, 2001
108
US
I am starting a new project and have never had a problem running apps with Tomcat. This new project runs out of memory when doing a search for flights. I tried using
-Xmx256m and -Xmx512m at command line but this did'nt help. Also while watching the memory in Perfmon (NT), it never went aboce 270 M, and I have 515 M installed.

Anyone help?
 
>> This new project runs out of memory

post the error message, stack dump.

-pete

 
Hmm, also what version Tomcat are you using (I've found 4.05 leaks memory like a holed bucket).

Maybe this "new project" is not releasing memory when its finished with it, whos code is it, yours?

L.
 
I am having a similar problem running Tomcat 5 with a servlet that needs a lot of memory. Setting -Xmx###m in the Tomcat startup script doesn't help - the error occurs when Win Task Manager shows java reaching a memory allocation way below my Xmx setting. I haven't had problems running servlets with smaller memory needs.

The "root cause" is a java.lang.OutOfMemoryError and the stack trace dump is:

javax.servlet.ServletException: Cannot allocate servlet instance for path /servlet/servletmotifsearcher.MotifSearcherServlet
at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:435)
at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:216)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:288)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:562)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1018)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:196)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:562)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1018)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2748)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:186)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:562)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1018)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:512)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:562)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1018)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:199)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:637)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:463)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:568)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:631)
at java.lang.Thread.run(Thread.java:484)


Have you managed to solve this? I am stuck.

JamesHThomas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top