Sample Header Ad - 728x90

Python programs suddenly get killed

24 votes
5 answers
74939 views
I'm running some python programs that are quite heavy. I've been running this script for several weeks now, but in the past couple of days, the program gets killed with the message:
Killed
I tried creating a new swap file with 8 GB, but it kept happening. I also tried using:
dmesg -T| grep -E -i -B100 'killed process'
which listed out the error:
[Sat Oct 17 02:08:41 2020] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/user@1000.service,task=python,pid=56849,uid=1000
[Sat Oct 17 02:08:41 2020] Out of memory: Killed process 56849 (python) total-vm:21719376kB, anon-rss:14311012kB, file-rss:0kB, shmem-rss:4kB, UID:1000 pgtables:40572kB oom_score_adj:0
I have a strong machine and I tried also not running anything else when running ( Pycharm or terminal) but it keeps happening. specs: * Ubuntu 20.04 LTS (64bit) * 15.4 GiB RAM * Intel Core i7-105100 CPU @ 1.80 GHz x 8 when running
-h t
total        used        free      shared  buff/cache   available
Mem:           15Gi       2.4Gi        10Gi       313Mi       2.0Gi        12Gi
Swap:         8.0Gi       1.0Gi       7.0Gi
Asked by yovel cohen (341 rep)
Oct 17, 2020, 11:32 AM
Last activity: Jan 11, 2024, 02:13 PM