tomcat内存问题

启动故障故障现象:

tail -f logs/catalina.out

z/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#1'
[2012-12-17 11:35:54:300] [main] INFO  (org.springframework.web.servlet.handler.SimpleUrlHandlerMapping:411)  - Mapped URL path [/common/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#2'
[2012-12-17 11:35:54:304] [main] INFO  (org.springframework.web.servlet.handler.SimpleUrlHandlerMapping:411)  - Mapped URL path [/image/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#3'
[2012-12-17 11:35:54:308] [main] INFO  (org.springframework.web.servlet.handler.SimpleUrlHandlerMapping:411)  - Mapped URL path [/resource/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#4'
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xf7908824, pid=7739, tid=3414432656
#
# JRE version: 6.0_24-b07
# Java VM: Java HotSpot(TM) Server VM (19.1-b02 mixed mode linux-x86 )
# Problematic frame:
# V  [libjvm.so+0x53e824]
#
# An error report file with more information is saved as:
# /opt/soft/apache-tomcat-gdxxw/hs_err_pid7739.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

解决方法:
查看apache-tomcat-gdxxw/hs_err_pid7739.log分析日志参数,设置内存大于剩余物理内存

bin/catalina.sh 文件前面添加如下:

JAVA_OPTS="-XX:PermSize=128M -XX:MaxPermSize=256m -Xms512m -Xmx512m -Duser.timezone=Asia/Shanghai"

再启动就没报错信息了。

你可能感兴趣的:(tomcat)