Context: I'm using bash in Mac OSX Yosemite.Problem: I'm executing a (python) script that I expect to use alot of resources and take a few hours to run, redirecting stdout and stderr to a log file.python script.py >> logfile.txt 2>&1Upon return, I find that I have been automatically logged out and the job doesn't finish. Furthermore, there is no evidence of a bug in the log file. It seems that the user process is being killed, and I'm curious how to catch it and then to prevent it from happening. Further relevant detail is that the python script is executing many database operations on a fairly large mongodb instance (~4million rows). I suspect that this has something to do with the ulimit settings. Mine are as follows:$ ulimit -acore file size          (blocks, -c) 0data seg size           (kbytes, -d) unlimitedfile size               (blocks, -f) unlimitedmax locked memory       (kbytes, -l) unlimitedmax memory size         (kbytes, -m) unlimitedopen files                      (-n) 256pipe size            (512 bytes, -p) 1stack size              (kbytes, -s) 8192cpu time               (seconds, -t) unlimitedmax user processes              (-u) 709virtual memory          (kbytes, -v) unlimited
Catch/diagnose user process being killed - Inexplicably logged out automatically
bash;osx;users;python;ulimit