diff --git a/README.md b/README.md index 3920058..2198e0a 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ rc-service xray restart - If you have scripts to automatically update these files, please adjust them accordingly - Regular users can ignore this change -#### Watchdog: Xray process will now automatically restart indefinitely (every 2 seconds) upon panic +#### Watchdog: Xray process will now automatically restart indefinitely (every 5 seconds) upon panic, unless it panic 3 times in 10 minutes - Advanced users no longer need to manually modify `/etc/init.d/xray` or write custom daemon scripts - Regular users can ignore this change diff --git a/README_zh-cn.md b/README_zh-cn.md index 368d4cb..4f04fec 100644 --- a/README_zh-cn.md +++ b/README_zh-cn.md @@ -62,7 +62,7 @@ rc-service xray restart - 如果你编写了一些脚本来自动更新这些文件,需要留意此项改动 - 普通用户无需关注此改动 -#### 看门狗:若 Xray 进程 `panic` 将无限自动重启,间隔 2 秒 +#### 看门狗:若 Xray 进程 `panic` 将无限自动重启,间隔 5 秒,除非 10 分钟内崩溃 3 次 - 对于高级用户,你无需再手动调整 `/etc/init.d/xray` 或自己编写 daemon 脚本了 - 普通用户无需关注此改动 diff --git a/README_zh-tw.md b/README_zh-tw.md index fec8d9c..3c88222 100644 --- a/README_zh-tw.md +++ b/README_zh-tw.md @@ -62,7 +62,7 @@ rc-service xray restart - 如果你編寫了一些腳本來自動更新這些文件,需要留意此項改動 - 普通用戶無需關注此改動 -#### 看門狗:若 Xray 進程 `panic` 將無限自動重啟,間隔 2 秒 +#### 看門狗:若 Xray 進程 `panic` 將無限自動重啟,間隔 5 秒,除非 10 分鐘內崩潰 3 次 - 對於高級用戶,你無需再手動調整 `/etc/init.d/xray` 或自己編寫 daemon 腳本了 - 普通用戶無需關注此改動 diff --git a/init.d/xray b/init.d/xray index 6eecf74..aece55b 100644 --- a/init.d/xray +++ b/init.d/xray @@ -4,9 +4,9 @@ name="Xray Daemon" description="A unified platform for anti-censorship" supervisor=supervise-daemon -respawn_delay=2 -respawn_max=0 -respawn_period=0 +respawn_delay=5 +respawn_max=2 +respawn_period=600 pidfile="/run/${RC_SVCNAME}.pid" rc_ulimit="-n 1024000 -u 1024000"