Hacker News new | ask | show | jobs
by rodgerd 4595 days ago
If you were using systemd, I'd imagine you'd tell it to restart your syslogger automagically, and use ExecStartPost or ExecReload to tickle nginx.
2 comments

I'm a little concerned that these days to go-to answer for a crashing daemon is to have another daemon that watches it and restarts it.

Who watches the watchers? What happened to writing things that don't break?

Whenever I hear this complaint the first thing I think about is this Douglas Adams quote:

  The major difference between a thing that might go wrong 
  and a thing that cannot possibly go wrong is that when a 
  thing that cannot possibly go wrong goes wrong it usually 
  turns out to be impossible to get at or repair.
Personally when doing operations related stuff I like to assume that everything will eventually break - though, hopefully not all at once.
That quote is entirely inapplicable though. It is in fact much easier to fix the simple, do one thing and do it well unix style applications. They are not hard to get at or repair. This is one area where I think the linux philosophy winning out over the unix philosophy has really cost us a lot.
If your PID 1 is screwed, the ordering of syslogd/nginx restarts is the least of your worries.
Perhaps, but there are plenty of scenarios where restarting won't help (e.g. daemon misconfiguration).
Yes, and it will still hang in the amount of time it takes to restart rsyslog.