简体   繁体   English

PHP Swoole 通知 ERRNO 1005

[英]PHP Swoole Notice ERRNO 1005

When Swoole is on heavy load and heavy requests I kept getting this Log:当 Swoole 负载重且请求繁重时,我不断收到此日志:

[2021-01-24 16:07:22 *33833.2] NOTICE finish (ERRNO 1005): session#21022 does not exists [2021-01-24 16:07:22 *33833.2] 通知完成 (ERRNO 1005): session#21022 不存在
[2021-01-24 16:07:22 *33833.2] NOTICE finish (ERRNO 1005): session#21022 does not exists [2021-01-24 16:07:22 *33833.2] 通知完成 (ERRNO 1005): session#21022 不存在
[2021-01-24 16:07:22 *33833.2] NOTICE finish (ERRNO 1005): session#21022 does not exists [2021-01-24 16:07:22 *33833.2] 通知完成 (ERRNO 1005): session#21022 不存在
[2021-01-24 16:07:22 *33833.2] NOTICE finish (ERRNO 1005): session#21022 does not exists [2021-01-24 16:07:22 *33833.2] 通知完成 (ERRNO 1005): session#21022 不存在
[2021-01-24 16:07:39 *33835.4] NOTICE finish (ERRNO 1005): session#21025 does not exists [2021-01-24 16:07:39 *33835.4] 通知完成 (ERRNO 1005): session#21025 不存在
[2021-01-24 16:07:39 *33835.4] NOTICE finish (ERRNO 1005): session#21025 does not exists [2021-01-24 16:07:39 *33835.4] 通知完成 (ERRNO 1005): session#21025 不存在
[2021-01-24 16:07:39 *33835.4] NOTICE end (ERRNO 1005): session[21025] is closed [2021-01-24 16:07:39 *33835.4] 通知结束(ERRNO 1005):会话 [21025] 已关闭


Or 或者

[2021-01-23 14:07:22 *5300.3] NOTICE php_swoole_http_onReceive (ERRNO 1005): session[10002] is closed [2021-01-23 14:07:22 *5300.3] 通知 php_swoole_http_onReceive (ERRNO 1005): session[10002] 已关闭
[2021-01-23 14:07:22 *5300.3] NOTICE php_swoole_http_onReceive (ERRNO 1005): session[10042] is closed [2021-01-23 14:07:22 *5300.3] 通知 php_swoole_http_onReceive (ERRNO 1005): session[10042] 已关闭
[2021-01-23 14:08:21 *5326.29] NOTICE php_swoole_http_onReceive (ERRNO 1005): session[10508] is closed [2021-01-23 14:08:21 *5326.29] 通知 php_swoole_http_onReceive (ERRNO 1005): session[10508] 已关闭
[2021-01-23 14:18:15 *5333.36] NOTICE finish (ERRNO 1005): session#12755 does not exists [2021-01-23 14:18:15 *5333.36] 通知完成 (ERRNO 1005): session#12755 不存在
[2021-01-23 14:18:15 *5333.36] NOTICE end (ERRNO 1005): session[12755] is closed [2021-01-23 14:18:15 *5333.36] 通知结束(ERRNO 1005):会话 [12755] 已关闭

In example I send total 500k requests with 1k concurrent requests, it logs this errors and hangs !在示例中,我发送了总共 500k 个请求和 1k 个并发请求,它记录了这个错误并挂起! And suddenly it hangs !突然它挂了!
My server is Centos 7, 8 gigabytes of RAM and 4 cores of CPU.我的服务器是 Centos 7,8 GB RAM 和 4 核 CPU。
Swoole is running with 40 workers, + 30 Master-Worker and 8 Reactor. Swoole 有 40 个工人、30 个 Master-Worker 和 8 个 Reactor。
Even in production this happens too.即使在生产中也会发生这种情况。
Can some one help me or explain me why this happens and maybe how can I solve it?有人可以帮助我或解释我为什么会发生这种情况,也许我该如何解决?
Thanks.谢谢。

Ok I have found where is the problem.好的,我发现问题出在哪里。 Actually it's not a bug in Swoole or my application.实际上这不是 Swoole 或我的应用程序中的错误。 It's a notice log that can get disabled with log_level property of Swoole server configuration.这是一个通知日志,可以通过 Swoole 服务器配置的 log_level 属性禁用。 This happens when a Client closes swoole tab or browser (Closes client connection), so it gets disconnected so Swoole cannot retrieve users session and logs this notice.当客户端关闭 swoole 选项卡或浏览器(关闭客户端连接)时会发生这种情况,因此它会断开连接,因此 Swoole 无法检索用户 session 并记录此通知。 Also if you are using bench marking tools like Apache ab or WRK, If a problem occurs, These testers will terminate all other requests and stop whole testing.此外,如果您使用 Apache ab 或 WRK 等基准标记工具,如果出现问题,这些测试人员将终止所有其他请求并停止整个测试。 So sessions get closed and logs written again.因此会话关闭并再次写入日志。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM