您好,请问我使用 https://www.workerman.net/q/1453 管理员评论的那个方法
这个方式 链接线上服务器wss地址(通过nginx转发)链接数2000
一开始链接非常快 每次 到达 1023个链接的时候 就开始链接就出现链接缓慢问题 一次2个链接再增加 后面直接 新增两个 断开两个
文档的linux内核优化已经做了 高并发event安装了
1022 connections complete
1023 connections complete
1024 connections complete
1025 connections complete
1026 connections complete
1027 connections complete
1028 connections complete
1029 connections complete
1030 connections complete
1031 connections complete
con1021 close
con1022 close
1032 connections complete
1033 connections complete
就链接不上了 是什么问题呢
status 显示如下
----------------------------------------------GLOBAL STATUS----------------------------------------------------
Workerman version:4.0.33 PHP version:7.4.29
start time:2022-05-27 08:40:06 run 0 days 0 hours
load average: 1.92, 0.78, 0.32 event-loop:\Workerman\Events\Event
3 workers 17 processes
worker_name exit_status exit_count
YourAppBusinessWorker 0 0
YourAppGateway 0 0
Register 0 0
----------------------------------------------PROCESS STATUS---------------------------------------------------
pid memory listening worker_name connections send_fail timers total_request qps status
1553 2M none YourAppBusinessWorker 9 0 0 183 0 [idle]
1554 2M none YourAppBusinessWorker 9 0 0 177 0 [idle]
1555 2M none YourAppBusinessWorker 9 0 0 177 0 [idle]
1556 2M none YourAppBusinessWorker 9 0 0 231 0 [idle]
1557 2M none YourAppBusinessWorker 9 0 0 183 0 [idle]
1558 2M none YourAppBusinessWorker 9 0 0 231 0 [idle]
1559 2M none YourAppBusinessWorker 9 0 0 192 0 [idle]
1560 2M none YourAppBusinessWorker 9 0 0 219 0 [idle]
1561 2M websocket://127.0.0.1:8686 YourAppGateway 10 0 1 15652 364 [idle]
1562 2M websocket://127.0.0.1:8686 YourAppGateway 9 0 1 15650 364 [idle]
1563 2M websocket://127.0.0.1:8686 YourAppGateway 10 0 1 15652 364 [idle]
1564 2M websocket://127.0.0.1:8686 YourAppGateway 12 0 1 15656 364 [idle]
1565 2M websocket://127.0.0.1:8686 YourAppGateway 15 0 1 15662 364 [idle]
1566 2M websocket://127.0.0.1:8686 YourAppGateway 27 0 1 15686 364 [idle]
1567 4M websocket://127.0.0.1:8686 YourAppGateway 87 0 1 15804 364 [idle]
1568 4M websocket://127.0.0.1:8686 YourAppGateway 411 0 1 16452 364 [idle]
1569 2M text://127.0.0.1:1238 Register 16 0 0 306 10 [idle]
----------------------------------------------PROCESS STATUS---------------------------------------------------
Summary 38M - - 669 0 8 128113 2922 [Summary]
压力脚本所在服务器也要安装event扩展,优化linux内核
有安装了
[root@izj6c58ed7tzwnsn8t36buz test]# php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
event
那可能是没优化linux内核,先直接连GatewayWorker试下,不要连nginx,没问题后再连nginx测试,排除nginx问题。
好的 谢谢