Skip to content

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

@fansheng0594

Description

@fansheng0594

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

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions