我们在生产环境中以不可预测的方式面临以下问题,有时服务器在一天或有时在一周内停机,下面是确切的错误转储,下面是服务器的设置.
JDK: jdk1.6.0_21 Server: Tomcat 7.0.2 OS: Red Hat Enterprise Linux Server release 5.5
在catalina.sh中,已完成以下设置:
JAVA_OPTS="-Xms1024M -Xmx1536M -XX:+HeapDumpOnOutOfMemoryError -XX:+AggressiveOpts
-XX:-DisableExplicitGC -XX:AdaptiveSizeThroughPutPolicy=0
-XX:+UsePSAdaptiveSurvivorSizePolicy
-XX:+UseAdaptiveGenerationSizePolicyAtMinorCollection
-XX:+UseAdaptiveGenerationSizePolicyAtMajorCollection -XX:PermSize=768M
-XX:MaxPermSize=768M -XX:+PrintGCDetails -Xloggc:/tmp/gcLogs.txt"
export CATALINA_OPTS="-Dcom.sun.management.jmxremote.port=22222
-Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.password.file=/jakarta-tomcat7/apache-tomcat-7.0.2/conf
/jmxremote.password -Dcom.sun.management.jmxremote.access.file=/jakarta-tomcat7/apache-
tomcat-7.0.2/conf/jmxremote.access"
Run Code Online (Sandbox Code Playgroud)
# # A fatal error has been detected by the Java Runtime Environment: # # java.lang.OutOfMemoryError: requested 1958536 bytes for Chunk::new. Out of swap space? # # Internal Error (allocation.cpp:215), pid=18658, tid=589781904 # Error: Chunk::new # # JRE version: 6.0_21-b06 # Java …