I have a python script which usually executes for about 25 minutes locally or at Ubuntu server
I start it by command:
python3 /home/mluser/Model_building/main.py
The process executes fine.
But whe I add it to crontab, it is being killed somewhere at the middle of a process.
oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/system.slice/cron.service,task=python3,pid=173805,uid=1001
Out of memory: Killed process 173805 (python3) total-vm:5394612kB, anon-rss:4876940kB, file-rss:32kB, shmem-rss:0kB, UID:1001 pgtables:9852kB oom_score_adj:0
oom_reaper: reaped process 173805 (python3), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
We have 16 GB RAM at server, the same as my local PC. I've tried logging RAM usage, but before the collapse its more than 50% of RAM is free.
Also tried using only one process in CRON, blocked all others, it doesn't change a thing.
The server is SSH.
What can possibly lead to solving the issue?