I have a few processes that for some reason end when they shouldn't. How can I know from the process ID if it was killed automatically by the kernel or even by some other user?
you should trace your process by
Strace Commande :
strace -p <PID> -o <OUTPUT_FILE>
sudo strace -p <PID> -o <OUTPUT_FILE>
in OUTPUT_FILE you will find all Informations about the execution of your Python Script and you can have some information about what causes their ends.