E
E
Evgeny_A2020-06-16 07:19:29
linux
Evgeny_A, 2020-06-16 07:19:29

Why are Python scripts randomly terminated?

There is a script that has not changed for a long time. It ran every night and did its job. Now this script can terminate at any time after launch, and "Terminated" will appear in the terminal. The Python environment has not been updated. Packages and their versions did not change.

What I have tried:

  1. Run a script as a Linux service by creating a .service file and running it
  2. I wrote another script that does not appear on the load on the server, but just waits (time.sleep(999999))
  3. Rebooted the server

In all cases, the scripts fall off, and in the logs "Terminated". Question: what to check? How to diagnose?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dr. Bacon, 2020-06-16
@bacon

What about the memory on the server, enough? What about the load, otherwise there are all sorts of overselling in OpenVZ? Are there any entries in syslog?

N
nigredon, 2020-06-17
@nigredon

You can test the script in another language, for example, in bash.
sleep 999999
If it does not stop, then the problem is only in python, maybe there is a 'killall python' somewhere.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question