服务器环境详细情况http://linux.chinaunix.net/bbs/thread-917262-1-1.html
[root@server ~]# java -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
查找http://forum.java.sun.com/thread.jspa?threadID=5207549再执行:
[root@server ~]# java -Xmx4090 -version
java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05)
Java HotSpot(TM) Server VM (build 1.5.0_13-b05, mixed mode)
就可以了!
因此在tomcat的catalina.sh加上JAVA_OPTS="-Xmx4090m" (在“if [ $have_tty -eq 1 ]; then”之下加入)
但是tomcat 的logs/catalina.out显示如下错误:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0xb793dc3e, pid=20148, tid=2904296368
#
# Java VM: Java HotSpot(TM) Server VM (1.5.0_13-b05 mixed mode)
# Problematic frame:
# V [libjvm.so+0x47ac3e]
#
hs_err_pid20148.log^@also had an error]
hs_err_pid20148.log^@also had an error]
# An error report file with more information is saved as hs_err_pid20148.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
换了下jre为1.6的最新版本,catalina.out则显示为:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0xb793dc3e, pid=20148, tid=2904296368
#
# Java VM: Java HotSpot(TM) Server VM (1.5.0_13-b05 mixed mode)
# Problematic frame:
# V [libjvm.so+0x47ac3e]
#
hs_err_pid20148.log^@also had an error]
hs_err_pid20148.log^@also had an error]
# An error report file with more information is saved as hs_err_pid20148.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
#
# An unexpected error has been detected by Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x06491866, pid=22040, tid=2964130736
#
# Java VM: Java HotSpot(TM) Server VM (1.6.0_03-b05 mixed mode)
# Problematic frame:
# V [libjvm.so+0x491866]
#
# An error report file with more information is saved as hs_err_pid22040.log
too many chars in signature
@ 3
too many chars in signature
@ 3
too many chars in signature
@ 67
[thread -1331364944 also had an error]
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
#
# An unexpected error has been detected by Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x06491866, pid=9747, tid=2963073968
#
# Java VM: Java HotSpot(TM) Server VM (1.6.0_03-b05 mixed mode)
# Problematic frame:
# V [libjvm.so+0x491866]
#
# An error report file with more information is saved as hs_err_pid9747.log
[thread -1330836560 also had an error]
评论