浏览代码

Increase default S6_SERVICES_READYTIME to 50 ms

Signed-off-by: Laurent Bercot <[email protected]>
Laurent Bercot 2 年之前
父节点
当前提交
40f57940e4
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 2 2
      README.md
  2. 1 1
      layout/rootfs-overlay/package/admin/s6-overlay-@VERSION@/etc/s6-rc/scripts/services-up

+ 2 - 2
README.md

@@ -831,9 +831,9 @@ wait, at shutdown time, for a script in `/etc/cont-finish.d` to finish naturally
 duration, the script will be sent a SIGKILL. Bear in mind that scripts in `/etc/cont.finish.d`
 are run sequentially, and the shutdown sequence will potentially wait for `S6_KILL_FINISH_MAXTIME`
 milliseconds for *each* script.
-* `S6_SERVICES_READYTIME` (default = 5): With services declared in `/etc/services.d`, there is
+* `S6_SERVICES_READYTIME` (default = 50): With services declared in `/etc/services.d`, there is
 an unavoidable race condition between the moment when services are started and the moment when
-they can be tested for readiness. To avoid that race, we sleep a little time, by default 5
+they can be tested for readiness. To avoid that race, we sleep a little time, by default 50
 milliseconds, before testing for readiness. If your machine is slow or very busy, you may
 get errors looking like `s6-svwait: fatal: unable to s6_svstatus_read: No such file or directory`.
 In that case, you should increase the sleeping time, by declaring it (in milliseconds) in the

+ 1 - 1
layout/rootfs-overlay/package/admin/s6-overlay-@VERSION@/etc/s6-rc/scripts/services-up

@@ -50,7 +50,7 @@ if dowait=`printcontenv S6_CMD_WAIT_FOR_SERVICES` && s6-test "$dowait" =~ '^[[:d
   fi
 
   if rtime=`printcontenv S6_SERVICES_READYTIME` && s6-test "$rtime" =~ '^[[:digit:]]+$' ; then : ; else
-    rtime=5
+    rtime=50
   fi
 
   # Increase if necessary. Unavoidable race condition, use s6-rc instead!