启动程序报错:
[linux@hw-sh-dmz-ecard-coupon-04 apache-tomcat-7.0.75]$ bin/shutdown.sh
Using CATALINA_BASE: /home/linux/fingerlink/tomcat/apache-tomcat-7.0.75
Using CATALINA_HOME: /home/linux/fingerlink/tomcat/apache-tomcat-7.0.75
Using CATALINA_TMPDIR: /home/linux/fingerlink/tomcat/apache-tomcat-7.0.75/temp
Using JRE_HOME: /home/linux/fingerlink/jdk1.7.0_75/jre
Using CLASSPATH: /home/linux/fingerlink/tomcat/apache-tomcat-7.0.75/bin/bootstrap.jar:/home/linux/fingerlink/tomcat/apache-tomcat-7.0.75/bin/tomcat-juli.jar
Java HotSpot™ 64-Bit Server VM warning: INFO: os::commit_memory(0x000000077ff80000, 1431830528, 0) failed; error=‘Cannot allocate memory’ (errno=12)
There is insufficient memory for the Java Runtime Environment to continue.
Native memory allocation (malloc) failed to allocate 1431830528 bytes for committing reserved memory.
An error report file with more information is saved as:
/home/linux/fingerlink/tomcat/apache-tomcat-7.0.75/hs_err_pid605.log
内存不足: 减少启动程序所需内存,或加大内存,如关闭一些程序。
解决方案:
调整tomca中对jvm内存的配置,因为jvm主要内存就是指jvm堆内存。
cd 到tomcat的/bin目录下,找到catalina.sh文件
vi 命令 vi catalina.sh 进入编辑状态,找到
JAVA_OPTS="-server -Xms256m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m "
进行修改。