think-swoole icon indicating copy to clipboard operation
think-swoole copied to clipboard

现在能做到像 nginx reload 那样平滑重启吗?

Open fansheng0594 opened this issue 1 year ago • 1 comments

我看到热更新时,是发送 SIGUSR1 信号的:

$watcher->watch(function () use ($pool) {
         Process::kill($pool->master_pid, SIGUSR1);
});

我测试过,在一个请求中 sleep(10),在 sleep 结束前随便修改一行代码触发热更新,之前 sleep(10) 的请求就自动结束了 请问有什么办法重启时让之前正在执行的请求顺利执行完吗?

fansheng0594 avatar Jan 08 '24 07:01 fansheng0594

还不可以,很影响业务

zmqfonnie avatar Sep 23 '24 17:09 zmqfonnie