问题
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