Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Neither does some init scripts we had to fix so it's 0:0 on this particular issue.

That issue is actually systemd considering success if config and dependencies are okay and service is started; it doesn't wait to return so it doesn't know whether service "works okay now", because it might exit with error 20ms after start.

    Type=notify
fixes that issue but obviously needs support from app themself to signal "I'm up and running now"

Less robust way is to set

    Type=forking
then

* if app exited with okay, it is considered running

* if app exited with not okay, you get error on start

but obviously then app need to be of self-forking type.

It's an iffy problem to solve; I guess systemd could have some wait interval to wait for service that might crash some milliseconds after start but that would delay every start unnecesarily



Right, like I said I don't think any init system has actually figured this out but that is what as an admin I actually care about rather than startup times or the aesthetic properties of the configuration files. You would need some kind of semantics that define what it means for a system to be "ready". In practice we tended to lean towards some kind of polling of the service itself (which is at least slightly better than "sleep 3" or whatever).

Now, it's true that if applications would adopt systemd's Notify system this could really help, but this is equivalent to saying "if software were different it might be better".


Yeah its PITA problem.

Like, service can fork, return okay then die after a second coz someone set memory size wrong. No real sensible way for init system to prevent it.

Or takes 5 minutes to load then hits some bad data and crashes.

We just set services on auto-restart, monitor it and flag alert if service is restarting too often.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: