Expand description
Random delay before each launch-time kill recovery (issue #181):
--on-kill-resume-delay <min[-max]> seconds; one number is a fixed delay,
0 (the default) resumes at onceOne host-wide OOM event can kill several detached docker executions at the same moment. Without a delay every watcher resumes its container in the same second, all of them rebuild their working sets at once, and the next OOM event follows. A uniformly random delay spreads the recoveries out.
Structs§
- Recovery
Delay Range - A delay range in seconds.
Constants§
- CANCEL_
CHECK_ INTERVAL_ MS - How often a pending recovery checks whether a stop was requested.
Functions§
- effective_
on_ kill_ resume_ delay - The normalized non-zero delay range, or
Nonewhen there is no delay. - format_
recovery_ delay 42s,42.5s.- format_
recovery_ delay_ range 30-90for a range,45for a fixed delay.- parse_
on_ kill_ resume_ delay_ value - Validate and normalize the
--on-kill-resume-delayargument. - parse_
recovery_ delay_ range - Parse
30-90,45or0;Nonewhen malformed ormax < min. - pick_
recovery_ delay_ ms - Pick a uniformly random delay in whole milliseconds; 0 without a range.
- record_
on_ kill_ resume_ delay - The delay range stored in a record option (a string, or a number when the
record codec turned
45into one). - system_
random - A uniformly random number in
[0, 1)from the OS random source behinduuidv4, so no extra dependency is needed. - system_
sleep - Block the current thread.
- wait_
for_ recovery_ delay - Wait out the delay in short steps, giving up as soon as
should_cancelreturns true (a--stopduring the wait). Returns true when cancelled.