C
C
chelkaz2017-04-05 05:57:49
linux
chelkaz, 2017-04-05 05:57:49

What is the "Failure" of a service in the systemd manager related to?

There is a service, my.service
Status showed everything is fine systemctl status my
Example:

my.service - My queue worker
   Loaded: loaded (/etc/systemd/system/my.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2017-04-05 05:41:20 MSK; 2min 34s ago
 Main PID: 7915 (php)
   CGroup: /system.slice/my.service
           └─7915 /usr/local/php/bin/php /www/artisan queue:work --sleep=30 --tries=3

But it didn't run the command! I turned everything over on the php side and was sure of the status, since everything works, it means it starts. I logged php for 2 hours, searched for the reason, and it all came down to the fact that no command launch from my.service occurs. I decided to do systemctl daemon-reload
and oh my! Everything worked. But how so?! Why?! How is the status?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PrAw, 2017-04-05
@chelkaz

if the process /usr/local/php/bin/php continues to be in memory, but is busy doing something wrong - from the point of view of the manager, it works fine.
Look for problems in the daemon code, add logging to figure out the reasons, or some kind of watchdog thread with external control to prop it up with a crutch

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question