Process finished with exit code 137 in PyCharm

折月煮酒 提交于 2020-07-04 20:00:55

问题


When I stop the script manually in PyCharm, process finished with exit code 137. But I didn't stop the script. Still got the exit code 137. What's the problem?

Python version is 3.6, process finished when running xgboost.train() method.


回答1:


Exit code 137 means that your process was killed by (signal 9) SIGKILL . In the case you manually stopped it - there's your answer.

If you didn't manually stop the script and still got this error code, then the script was killed by your OS. In most of the cases, it is caused by excessive memory usage.




回答2:


I had the same error. In my case was related to excessive memory usage. Solved after reseting/cleaning my cache data adding the following code for every variable that will not be used anymore :

MyVariableName = None



回答3:


It's not always a memory issue. In my case subprocess.Popen was utilized and it was throwing the error as 137 which looks like signalKILL and the cause is definitely not the memory utilization, because during the runtime it was hardly using 1% of memory use. This seems to be a permission issue after more investigation. I simply moved the scripts from /home/ubuntu to the root directory.




回答4:


{In my experience}

this is because of Memory issue. When I try to train ml model using sklearn fit with full data set , it abruptly breaks and gives whereas with small data it works fine.

Process finished with exit code 137 (interrupted by signal 9: SIGKILL) Interestingly this is not caught in Exception block either




回答5:


My python process get killed with the 137 error code because my Docker for Windows memory limit was set too low.



来源:https://stackoverflow.com/questions/43268156/process-finished-with-exit-code-137-in-pycharm

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