/srv/irclogs.ubuntu.com/2016/11/08/#upstart.txt

=== JanC_ is now known as JanC
timvisherin an upstart job, if i use `respawn \n respawn limit 10 5 \n post-stop exec sleep 60`, does that mean that my respawn limit will never be reached because it should never respawn more than once every 60 seconds?12:17
timvisherit looks like it's true that if you sleep between respawns you have to also increase the interval to encompass the sleep duration12:49
timvisher 12:49
supergonkastimvisher: the respawn limit tells the max times it can restart for a X time14:01
supergonkasSo if it's broken or something and keeps restarting, it won't do it for ever 14:01
supergonkasIf I understood your question 14:01
timvishersupergonkas: right. so if you're sleeping between each invocation (say for 1 second) and your respawn limit is 10 5, then you'll by definition never hit that limit14:47
timvisherbecause you can't respawn 10 times in 5 seconds if you're sleeping for a second every time you respawn14:47
supergonkasYes14:47
supergonkasMm well depends if the service crashes before the sleep is executed, I think 14:48
timvisherso you basically need to incorporate the sleep time and assume that you're failing immediately or some how otherwise determine the acceptable failure overhead14:48
timvishereh? sleep is being executed in post-stop14:48
timvisherso no matter how the process dies it'll sleep, unless you're using `stop` explicitly iiuc14:49
timvisheris that accurate?14:49
supergonkasIgnore me, just re-read your original message 14:49
timvisherlol. no problem :)14:49
timvisherthanks for the help14:49
supergonkasYes I would say the sleep is always executed 14:50
supergonkasYour best bet is just increase the interval of the respawn limit, that is within the same frequency as the original 14:59
supergonkasOr move the sleep 14:59
supergonkas*I think your best bet.. 14:59
timvishersupergonkas: yep. that's what i did. i have a sleep of 60 seconds and a respawn limit of 30 ~180015:00
AnrDaemontimvisher: Check the cookbook. It has the flow diagram.15:57
timvisherAnrDaemon: where?16:00
timvisheroh nevermind i found it16:01
AnrDaemongoogle "upstart cookbook", first result ;)16:08
timvishernot the cookbook itself, the flow diagram :)16:15
AnrDaemonThe two biggest pics in there.16:24

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!