[英]'Cannot allocate memory' (errno=12)' errors during runtime of Java application
While running a distributed application, I get a lot of these errors on the server as well as on the worker nodes: 运行分布式应用程序时,我在服务器和工作节点上都会遇到很多错误:
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f4f8c800000, 549453824, 2097152, 0) failed; error='Cannot allocate memory' (errno=12)
Most of the time the process continues and finishes as expected but sometimes the process also fails. 大多数情况下,流程会按预期继续并完成,但有时流程也会失败。
I am calling my application with java -Xms512M -Xmx50G -cp myjar.jar myclass.Main
我用java -Xms512M -Xmx50G -cp myjar.jar myclass.Main
调用我的应用程序java -Xms512M -Xmx50G -cp myjar.jar myclass.Main
The nodes have 128 GBs of RAM where about 120 GBs are free. 节点有128 GB的RAM,大约120 GB是免费的。
I'm using the Oracle JVM: 我正在使用Oracle JVM:
$ java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
What do these messages mean and how can I get rid of them? 这些消息意味着什么,我怎么能摆脱它们?
As Platypus suggested in the comments to my question, I downgraded Java to version 1.7.0_41. 正如Platypus在我的问题评论中所建议的那样,我将Java降级为1.7.0_41版本。 Unfortunately the problem persisted. 不幸的是问题仍然存在。
I went even farther back to version 1.7.0_25 and apparently this solved the error. 我甚至更远回到版本1.7.0_25,显然这解决了错误。 I tried it many times and the error message didn't occur a single more time. 我尝试了很多次,错误消息没有再发生一次。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.