Java program terminate with java result: 137

吃可爱长大的小学妹 提交于 2020-01-01 01:53:07

问题


I have a program written in netbeans. The program read about 1,000,000 data from cassandra, process them and again write the result in cassandra. my program was running bout 9 hours but suddenly it was terminate with this bellow error:

java result: 137

I was read that these error means (128 + signalnember). in my case signalnember = 9 that is KILLSIGNAL. does any body know how can I remove this error? please help me....


回答1:


If there is a cgroup configuration limiting resources it might kill the process if if exceeds the limits (like consumed memory). Check if the cgconfig service running. On RHEL:

service cgconfig status

You can also check for Java crash log files hs_err_.log for more details.




回答2:


Exit-code above 128 means that the process died because of a received signal (exitCode = 128 + signalNumber). ==> In your case it was signal 9 (= SIGKILL




回答3:


Since its an outofmemory issue I would just split the operation into pieces if possible. I had to do it today actually where I was processing about 15,000,000 million records today. I just broke it up into chunks of 250,000 looped it and cleared my arrays.



来源:https://stackoverflow.com/questions/18524574/java-program-terminate-with-java-result-137

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!