{"action":"created","issue":{"url":"https://api.github.com/repos/swoole/swoole-src/issues/459","labels_url":"https://api.github.com/repos/swoole/swoole-src/issues/459/labels{/name}","comments_url":"https://api.github.com/repos/swoole/swoole-src/issues/459/comments","events_url":"https://api.github.com/repos/swoole/swoole-src/issues/459/events","html_url":"https://github.com/swoole/swoole-src/issues/459","id":124327819,"number":459,"title":"\\swoole_server::reload()方法有一定机率报错","user":{"login":"andares","id":7556505,"avatar_url":"https://avatars.githubusercontent.com/u/7556505?v=3","gravatar_id":"","url":"https://api.github.com/users/andares","html_url":"https://github.com/andares","followers_url":"https://api.github.com/users/andares/followers","following_url":"https://api.github.com/users/andares/following{/other_user}","gists_url":"https://api.github.com/users/andares/gists{/gist_id}","starred_url":"https://api.github.com/users/andares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andares/subscriptions","organizations_url":"https://api.github.com/users/andares/orgs","repos_url":"https://api.github.com/users/andares/repos","events_url":"https://api.github.com/users/andares/events{/privacy}","received_events_url":"https://api.github.com/users/andares/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/swoole/swoole-src/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-30T09:53:15Z","updated_at":"2016-02-01T08:17:21Z","closed_at":"2016-02-01T08:17:21Z","body":"我这边记到的日志如下：\r\n\r\n    [2015-12-30 17:38:15 $26695.0]\tNOTICE\tServer is reloading now.\r\n    [2015-12-30 17:38:15 $26695.0]\tWARN\tswManager_check_exit_status: worker#0 abnormal exit, status=0, signal=11\r\n    \r\n    [2015-12-30 17:38:15] Worker error: 0 - 0\r\n\r\n某个worker会莫名报错，同时workerError事件中也没有$worker_id和$exit_code，传入的$server也是空的（之前会在这里打印$server->worker_pid，结果会导致更严重的错误）。\r\n\r\n之后会少掉一个worker，manager也不会再启一下，整个服务架构似乎就运作不正常了。\r\n\r\n如果再尝试用client发消息要求reload或是stop（我有一个专门监听本地请求的端口用于管理服务），会返回：\r\n\r\n    ➜  ~  swtry --debug reload\r\n     * Check PHP version ......... 5.6.16 - OK.\r\n     * Check Swoole version ...... 1.7.21 - OK.\r\n    << Launcher prepare fail: swoole_client::recv(): recv() failed. Error: Resource temporarily unavailable [11]\r\n    ➜  ~  swtry --debug stop  \r\n     * Check PHP version ......... 5.6.16 - OK.\r\n     * Check Swoole version ...... 1.7.21 - OK.\r\n    << Launcher prepare fail: swoole_client::recv(): recv() failed. Error: Resource temporarily unavailable [11]\r\n\r\nfail:后面的文字是swoole_client的输出。\r\n\r\n这个问题偶尔会出现，运行环境上面有显示。代码是phar打包的，不过当时reload的时候确认phar包没有更新过（设计时也不考虑phar包更新后swoole进程实时reload更新，这个不靠谱）。\r\n\r\nRango能看看可能是什么原因导致的么。"},"comment":{"url":"https://api.github.com/repos/swoole/swoole-src/issues/comments/177836057","html_url":"https://github.com/swoole/swoole-src/issues/459#issuecomment-177836057","issue_url":"https://api.github.com/repos/swoole/swoole-src/issues/459","id":177836057,"user":{"login":"andares","id":7556505,"avatar_url":"https://avatars.githubusercontent.com/u/7556505?v=3","gravatar_id":"","url":"https://api.github.com/users/andares","html_url":"https://github.com/andares","followers_url":"https://api.github.com/users/andares/followers","following_url":"https://api.github.com/users/andares/following{/other_user}","gists_url":"https://api.github.com/users/andares/gists{/gist_id}","starred_url":"https://api.github.com/users/andares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andares/subscriptions","organizations_url":"https://api.github.com/users/andares/orgs","repos_url":"https://api.github.com/users/andares/repos","events_url":"https://api.github.com/users/andares/events{/privacy}","received_events_url":"https://api.github.com/users/andares/received_events","type":"User","site_admin":false},"created_at":"2016-02-01T08:17:21Z","updated_at":"2016-02-01T08:17:21Z","body":"线上试了几次未出现该问题，先关掉了。"}}