Java 程序以 java 结果终止:137
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18524574/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Java program terminate with java result: 137
提问by Anse danesh
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:
我有一个用 netbeans 编写的程序。该程序从 cassandra 中读取了大约 1,000,000 条数据,处理它们并再次将结果写入 cassandra。我的程序运行了大约 9 个小时,但突然因以下错误而终止:
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....
我读到这些错误意味着(128 + signalnember)。在我的情况下,signalnember = 9 即 KILLSIGNAL。有没有人知道我怎样才能消除这个错误?请帮我....
回答by user2600629
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
退出代码高于 128 意味着进程因接收到信号而死亡(exitCode = 128 + signalNumber)。==> 在您的情况下,它是信号 9(= SIGKILL
回答by user2600629
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.
由于它的内存不足问题,如果可能,我只会将操作拆分为多个部分。我今天必须处理大约 15,000,000 百万条记录。我只是将它分解成 250,000 个循环的块并清除了我的数组。
回答by Sergey Shcherbakov
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:
如果存在限制资源的 cgroup 配置,如果超出限制(例如消耗的内存),它可能会终止进程。检查 cgconfig 服务是否正在运行。在 RHEL 上:
service cgconfig status
You can also check for Java crash log files hs_err_.log for more details.
您还可以检查 Java 崩溃日志文件 hs_err_.log 以获取更多详细信息。