I
I
Igor2021-12-03 13:32:50
Python
Igor, 2021-12-03 13:32:50

How to trace python exception of running service on VDS server?

I rented a mini-server, launched a telegram bot on it as a service, so that it would restart automatically if it crashes.
He fell down the first night and didn't get up. How can I see on the server what error caused it to stop working?
In the terminal, of course, there is nothing. the script is running as a service.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Gornostaev, 2021-12-03
@karonion

Use some kind of process manager, such as supervisord, which will keep logs and restart the fallen one.

K
ky0, 2021-12-03
@ky0

In the terminal, of course, there is nothing. the script is running as a service.

Well, look in the magazine. By default, each service writes all output and errors there.
so that it restarts automatically if it crashes

systemd and should have taken care of this if the appropriate setting is in the unit-config.

D
Drno, 2021-12-03
@Drno

see the logs
and good advice to make supervisord

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question