Native memory allocation (malloc) failed问题解决方法
在系统打了一下安全补丁后,AppCan的版本升级推送平台在启动tomcat的时候报如下错误
2019-06-28 14:07:06:INFO main org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started 2019-06-28 14:07:06:INFO main org.springframework.web.context.support.XmlWebApplicationContext - Refreshing Root WebApplicationContext: startup date [Fri Jun 28 14:07:06 CST 2019]; root of context hierarchy 2019-06-28 14:07:06:INFO main org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [application-context.xml] 2019-06-28 14:07:08:INFO main org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [application-context-hibernate.xml] Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000007e5600000, 446693376, 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 446693376 bytes for committing reserved memory. # An error report file with more information is saved as: # /usr/share/tomcat6/hs_err_pid25844.log
通过日志可以看出,是实际所要分配的内存超过了系统可以分配能力,导致启动失败
配置内容如下:
JAVA_OPTS="${JAVA_OPTS} -Xms512m -Xmx4069m -XX:PermSize=1024m -XX:MaxNewSize=1024m -XX:MaxPermSize=2048m"
修改相关启动参数如下:
JAVA_OPTS="${JAVA_OPTS} -Xms1024m -Xmx1024m -XX:PermSize=1024m -XX:MaxNewSize=1024m -XX:MaxPermSize=2048m"
再次启动tomcat,启动成功
道理很简单,就不多说了,做此记录,希望其他人遇到同样的问题能看到这篇文章并很快解决
©️公众号:思考者文刀
- 上一篇: 本站slogon
- 下一篇: 《琅琊榜之风起长林》的三句话
评论
搜推网www.sotuiwangcom
回复如何把技术转化成金钱价值
imitker
回复@搜推网www.sotuiwangcom 蓄势待发,先提升技术再找机会,在稀缺性和不可替代性上下功夫
965影视
回复965影视: www.965ys.net
博主你好,请问下换影视站友链不?
imitker
回复@965影视 可以,请qq联系