A
A
AlmazKayum2018-08-16 16:06:06
linux
AlmazKayum, 2018-08-16 16:06:06

Why does a script run through systemd hang?

I always ran my Python scripts through nohup, they often crashed, here on Toaster they advised me to run scripts as a system process using systemd.
I set up the work using the article https://jeckill.ru/zapusk-python-skripta-kak-servis/
But the scripts both hung up and hung up. What do I mean by hang. That is, the script for the telegram bot worked and worked, and then simply stopped accepting updates, without any errors in the logs.
systemctl start *.service doesn't help. The service is enabled but not running.
Only
systemctl restart *.service
helps. Scripts hang every 2-3 days. Therefore, the problem cannot be postponed.
What do you think could be the reason?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
OnYourLips, 2018-08-16
@OnYourLips

You need to debug the script, the problem is in it.
It doesn't stop working, it just doesn't work properly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question