首页
下载
文档
问答社区
视频
捐赠
源代码
AI 助理
赞助商
CRMEB
Apipost
腾讯云
微擎
禅道
51Talk
商业产品
Swoole AI 智能文档翻译器
Swoole-Compiler PHP 代码加密器
CRMEB 新零售社交电商系统
登录
注册
全部
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
发表新帖
压测 swoole 卡住
### 问题描述 开了 4 个 worker 进程,压测 几分钟后程序 hang 住, 一个 worker 进程,疯狂接收空字符串,202 是个 tcp 连接描述符 ``` [root@ab-app ~]# strace -fp 12482 [pid 12482] recvfrom(202, "", 2, 0, NULL, NULL) = 0 [pid 12482] recvfrom(202, "", 2, 0, NULL, NULL) = 0 [pid 12482] recvfrom(202, "", 2, 0, NULL, NULL) = 0 [pid 12482] recvfrom(202, "", 2, 0, NULL, NULL) = 0 [pid 12482] recvfrom(202, "", 2, 0, NULL, NULL) = 0 [pid 12482] recvfrom(202, "", 2, 0, NULL, NULL) = 0 .... .... ... ``` 另三个 worker 进程阻塞在这里: ``` [root@ab-app ~]# strace -fp 12483 strace: Process 12483 attached with 5 threads [pid 12529] futex(0x1e91934, FUTEX_WAIT_PRIVATE, 51520, NULL <unfinished ...> [pid 12528] futex(0x1e91934, FUTEX_WAIT_PRIVATE, 51522, NULL <unfinished ...> [pid 12527] futex(0x1e91934, FUTEX_WAIT_PRIVATE, 51518, NULL <unfinished ...> [pid 12526] futex(0x1e91934, FUTEX_WAIT_PRIVATE, 51524, NULL <unfinished ...> [pid 12529] <... futex resumed> ) = -1 EAGAIN (Resource temporarily unavailable) [pid 12528] <... futex resumed> ) = -1 EAGAIN (Resource temporarily unavailable) [pid 12527] <... futex resumed> ) = -1 EAGAIN (Resource temporarily unavailable) [pid 12529] futex(0x1e91934, FUTEX_WAIT_PRIVATE, 51524, NULL <unfinished ...> [pid 12528] futex(0x1e91934, FUTEX_WAIT_PRIVATE, 51524, NULL <unfinished ...> [pid 12527] futex(0x1e91934, FUTEX_WAIT_PRIVATE, 51524, NULL ``` ### Swoole版本,PHP版本,以及操作系统版本信息 swoole:4.4.18 PHP:7.2 centos7 ### 你期待的结果是什么?实际看到的错误信息又是什么? 怎么知道以上的发生原因
发布于3年前 · 11 次浏览 · 来自
提问
too
### 问题描述 开了 4 个 worker 进程,压测 几分钟后程序 hang 住, 一个 worker 进程,疯狂接收空字符串,202 是个 tcp 连接描述符 ``` [root@ab-app ~]# strace -fp 12482 [pid 12482] recvfrom(202, "", 2, 0, NULL, NULL) = 0 [pid 12482] recvfrom(202, "", 2, 0, NULL, NULL) = 0 [pid 12482] recvfrom(202, "", 2, 0, NULL, NULL) = 0 [pid 12482] recvfrom(202, "", 2, 0, NULL, NULL) = 0 [pid 12482] recvfrom(202, "", 2, 0, NULL, NULL) = 0 [pid 12482] recvfrom(202, "", 2, 0, NULL, NULL) = 0 .... .... ... ``` 另三个 worker 进程阻塞在这里: ``` [root@ab-app ~]# strace -fp 12483 strace: Process 12483 attached with 5 threads [pid 12529] futex(0x1e91934, FUTEX_WAIT_PRIVATE, 51520, NULL <unfinished ...> [pid 12528] futex(0x1e91934, FUTEX_WAIT_PRIVATE, 51522, NULL <unfinished ...> [pid 12527] futex(0x1e91934, FUTEX_WAIT_PRIVATE, 51518, NULL <unfinished ...> [pid 12526] futex(0x1e91934, FUTEX_WAIT_PRIVATE, 51524, NULL <unfinished ...> [pid 12529] <... futex resumed> ) = -1 EAGAIN (Resource temporarily unavailable) [pid 12528] <... futex resumed> ) = -1 EAGAIN (Resource temporarily unavailable) [pid 12527] <... futex resumed> ) = -1 EAGAIN (Resource temporarily unavailable) [pid 12529] futex(0x1e91934, FUTEX_WAIT_PRIVATE, 51524, NULL <unfinished ...> [pid 12528] futex(0x1e91934, FUTEX_WAIT_PRIVATE, 51524, NULL <unfinished ...> [pid 12527] futex(0x1e91934, FUTEX_WAIT_PRIVATE, 51524, NULL ``` ### Swoole版本,PHP版本,以及操作系统版本信息 swoole:4.4.18 PHP:7.2 centos7 ### 你期待的结果是什么?实际看到的错误信息又是什么? 怎么知道以上的发生原因
赞
0
分享
收藏
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
评论
2020-12-22
天王盖地虎
哈喽,代码是什么,我来复现一下。
赞
0
回复
微信公众号
热门内容
暂无回复的问答
- CodeGalaxy K3s 轻量集群节点之间如何实现负载均衡
- 关于openssl CURL WARNING swSSL_connect: SSL_connect(fd=69) failed. Error: error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small[1|394]
- 多个模型如何进行事务异常回退?
- websocket开启wss报错
- 协程tcp服务器如何使用多进程?recv()方法接收信息,打印出来的pid一直是同一个。没用使用到多进程啊。