Windows XP Windows 7 Windows 2003 Windows Vista Windows教程綜合 Linux 系統教程
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟件教程
 Windows教程網 >> Linux系統教程 >> Linux教程 >> tomcat 內存溢出以及臨時解決辦法

tomcat 內存溢出以及臨時解決辦法

日期:2017/2/7 16:56:21      編輯:Linux教程

現象描述:

  TOMCAT進程還在,但無響應。導致WEB頁面無法浏覽。。。。

  查看日志:

  /usr/local/Tomcat_Front/logs/localhost.2007-07-01.log

  #vi localhost.2007-07-01.log

  查詢關鍵字“OutOfMemoryError”,結果如下:

  2007-7-1 22:47:22 org.apache.catalina.core.ApplicationDispatcher invoke

  嚴重: Servlet.service() for servlet 51auto threw exception

  java.lang.OutOfMemoryError: Java heap space

  2007-7-1 22:47:22 org.apache.catalina.core.StandardWrapperValve invoke

  嚴重: Servlet.service() for servlet default threw exception

  java.lang.OutOfMemoryError: Java heap space

  /OutOfMemoryError

  at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)

  at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)

  at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)

  at com.jiuxing.website.control.Control.service(Control.java:54)

  at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

  at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)

  at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)

  at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)

  at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)

  at org.tuckey.web.filters.urlrewrite.RewrittenUrl.doRewrite(RewrittenUrl.java:176)

  at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:728)

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

  at com.jiuxing.website.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:87)

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)

  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)

  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

  at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)

  at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)

  at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:744)

  at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:674)

  at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:866)

  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

  at java.lang.Thread.run(Thread.java:595)

  暫時解決方法:

  加大-Xmx512m為-Xmx1024m。

Copyright © Windows教程網 All Rights Reserved