M
Mit Majithia
Hi,
We are running a web application which is a stateless system and
gets a lot of hits a day per server.
We are running the following configuration :
Red Hat Linux 7.3
Linux Kernel 2.4.20-19.7smp
Sun JVM JDK 1.4.1_02
The machine has 2GB of RAM and we have set the -XMx=1500M.
Pretty much everyday after about 200,000 - 250,000 hits, the
server get the error shown below. We have looked at the memory usage
and it looks ok.The application does load up some data and use a
substantial amount of memory(about 500M). But we looking through both
top and Runtime.getRuntime().totalMemory() we see that it has still
not close to the 1500M limit that we have set. Also we use the
following code on a jsp page to montior the threads and they don't
seem to be spiralling out of control
Thread[] threads = new Thread[1000];
ThreadGroup tg = Thread.currentThread().getThreadGroup();
while (tg.getParent() != null)
{
tg = tg.getParent();
}
tg.enumerate( threads );
for (int i = 0; i < threads.length; i++)
{
if (threads != null)
{
out.print(i + ": ");
out.print( "pri=" + threads.getPriority() + " ");
out.print( "ac=" + threads.activeCount() + " ");
out.println(threads);
}
}
Does anyone have any idea what the problem could be ? What the
possible issues could be ? We have looked at Memory and threads and
they don't seem to be the issue. Is here any documentation about the
cases that would through up this error ? Any help in this matter would
be greatly appreciated.
Thanks,
Mit
javax.servlet.ServletException: Servlet execution threw an exception
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)
----- Root Cause -----
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start(Native Method)
at com.i411.search.controller.LowLevelSearch.performSocketSearch(LowLevelSearch.java:428)
at com.i411.search.controller.LowLevelSearch.performNetworkSearch(LowLevelSearch.java:348)
at com.i411.search.controller.LowLevelSearch.ExecuteSearch(LowLevelSearch.java:145)
at com.i411.search.controller.SearchController.catItemsSearch(SearchController.java:407)
at com.i411.search.controller.SearchController.getSearchResults(SearchController.java:84)
at com.i411.dex.searchflow.SearchExecutor.run(SearchExecutor.java:45)
at com.i411.dex.searchflow.BusinessNameSearchExecutor.run(BusinessNameSearchExecutor.java:82)
at com.i411.dex.searchflow.DexSearchFlow.performSearchFlow(DexSearchFlow.java:335)
at com.i411.web.common.WebController.executeSearchWithSearchFlow(WebController.java:137)
at com.i411.web.common.WebController.executeSearchWithSearchFlow(WebController.java:182)
at com.i411.dex.xml.XMLSearchServlet.PerformQuerySearch(XMLSearchServlet.java:260)
at com.i411.dex.xml.XMLSearchServlet.doGet(XMLSearchServlet.java:178)
at com.i411.dex.xml.XMLSearchServlet.doPost(XMLSearchServlet.java:366)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)
We are running a web application which is a stateless system and
gets a lot of hits a day per server.
We are running the following configuration :
Red Hat Linux 7.3
Linux Kernel 2.4.20-19.7smp
Sun JVM JDK 1.4.1_02
The machine has 2GB of RAM and we have set the -XMx=1500M.
Pretty much everyday after about 200,000 - 250,000 hits, the
server get the error shown below. We have looked at the memory usage
and it looks ok.The application does load up some data and use a
substantial amount of memory(about 500M). But we looking through both
top and Runtime.getRuntime().totalMemory() we see that it has still
not close to the 1500M limit that we have set. Also we use the
following code on a jsp page to montior the threads and they don't
seem to be spiralling out of control
Thread[] threads = new Thread[1000];
ThreadGroup tg = Thread.currentThread().getThreadGroup();
while (tg.getParent() != null)
{
tg = tg.getParent();
}
tg.enumerate( threads );
for (int i = 0; i < threads.length; i++)
{
if (threads != null)
{
out.print(i + ": ");
out.print( "pri=" + threads.getPriority() + " ");
out.print( "ac=" + threads.activeCount() + " ");
out.println(threads);
}
}
Does anyone have any idea what the problem could be ? What the
possible issues could be ? We have looked at Memory and threads and
they don't seem to be the issue. Is here any documentation about the
cases that would through up this error ? Any help in this matter would
be greatly appreciated.
Thanks,
Mit
javax.servlet.ServletException: Servlet execution threw an exception
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)
----- Root Cause -----
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start(Native Method)
at com.i411.search.controller.LowLevelSearch.performSocketSearch(LowLevelSearch.java:428)
at com.i411.search.controller.LowLevelSearch.performNetworkSearch(LowLevelSearch.java:348)
at com.i411.search.controller.LowLevelSearch.ExecuteSearch(LowLevelSearch.java:145)
at com.i411.search.controller.SearchController.catItemsSearch(SearchController.java:407)
at com.i411.search.controller.SearchController.getSearchResults(SearchController.java:84)
at com.i411.dex.searchflow.SearchExecutor.run(SearchExecutor.java:45)
at com.i411.dex.searchflow.BusinessNameSearchExecutor.run(BusinessNameSearchExecutor.java:82)
at com.i411.dex.searchflow.DexSearchFlow.performSearchFlow(DexSearchFlow.java:335)
at com.i411.web.common.WebController.executeSearchWithSearchFlow(WebController.java:137)
at com.i411.web.common.WebController.executeSearchWithSearchFlow(WebController.java:182)
at com.i411.dex.xml.XMLSearchServlet.PerformQuerySearch(XMLSearchServlet.java:260)
at com.i411.dex.xml.XMLSearchServlet.doGet(XMLSearchServlet.java:178)
at com.i411.dex.xml.XMLSearchServlet.doPost(XMLSearchServlet.java:366)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)