现象:启动报错
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 536870912 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /usr/local/apache-tomcat_04-7.0.64/hs_err_pid31180.log
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000bae00000, 536870912, 0) failed; error='Cannot allocate memory' (errno=12)
解决: 再setenv.sh这里要重新调整内存,这种情况是设置的过大,包括-Xms512m -Xmx512m -Xss1m NewSize=256m -XX:MaxNewSize=512m这样的值,物理内存不够,把配置调小
本文详细解析了启动Tomcat时遇到的内存不足错误,具体表现为Java运行环境无法分配足够的内存空间。通过调整setenv.sh文件中的内存配置,如-Xms、-Xmx等参数,成功解决了物理内存不足的问题。
4246

被折叠的 条评论
为什么被折叠?



