使用gatewayWorker開發(fā)的websocket服務(wù),在寶塔環(huán)境下,配置nginx代理后,nginx偶爾會報
錯誤1:
[error] 1511926#0: *51138 recv() failed (104: Connection reset by peer) while reading response header from upstream, client:xxxx
錯誤2:
[error] 3219339#0: *10411652 send() failed (32: Broken pipe) while proxying upgraded connection, client: 117.136.62.231
nginx的配置:
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Connection "";
if (!-f $request_filename){
proxy_pass http://127.0.0.1:7273;
}
}
錯誤1:
[error] 1511926#0: *51138 recv() failed (104: Connection reset by peer) while reading response header from upstream, client:xxxx
錯誤2:
[error] 3219339#0: *10411652 send() failed (32: Broken pipe) while proxying upgraded connection, client: 117.136.62.231
"workerman/gateway-worker": "^3.0",
Nginx 1.22.1
reload,restart 會導(dǎo)致這樣的報錯,可以忽略
一天零星1-4條吧,同時在線有個500+。
日志:2024-01-31 17:00:21 pid:1656330 Workerman[start.php] has been stopped
2024-01-31 17:00:21 pid:1713163 Workerman[start.php] stop success
2024-01-31 17:00:24 pid:1713307 Workerman[start.php] start in DAEMON mode
2024-01-31 17:00:35 pid:1713828 Workerman[start.php] status
2024-01-31 17:18:54 pid:1762820 Workerman[start.php] status
2024-01-31 17:18:59 pid:1763041 Workerman[start.php] status
2024-01-31 18:05:34 pid:1888235 Workerman[start.php] status
2024-01-31 18:09:54 pid:1900842 Workerman[start.php] status
2024-01-31 18:14:08 pid:1912516 Workerman[start.php] status
2024-01-31 18:15:34 pid:1916401 Workerman[start.php] status
2024-01-31 18:18:20 pid:1924105 Workerman[start.php] status
2024-01-31 18:18:39 pid:1924712 Workerman[start.php] status
2024-02-01 09:21:20 pid:3208460 Workerman[start.php] status
2024-02-22 14:17:32 pid:3708738 Workerman[start.php] status
Broken pipe 那條應(yīng)該是客戶端與nginx交互的時候客戶端關(guān)閉導(dǎo)致,和gatewayWorker沒關(guān)系。
Connection reset by peer 具體報錯時間是?
心跳30S
最新的:
2024/03/02 23:33:47 [error] 3219339#0: 10246953 send() failed (32: Broken pipe) while proxying upgraded connection, client: 39.144.153.183,
2024/03/03 21:49:22 [error] 3219339#0: 10335155 send() failed (32: Broken pipe) while proxying upgraded connection, client: 39.144.249.17,
2024/03/03 21:52:38 [error] 3219339#0: 10335557 send() failed (32: Broken pipe) while proxying upgraded connection, client: 39.144.249.17,
2024/03/04 01:09:10 [error] 3219339#0: 10363410 send() failed (32: Broken pipe) while proxying upgraded connection, client: 39.144.249.17,
2024/03/04 10:33:29 [error] 3219339#0: 10411652 send() failed (32: Broken pipe) while proxying upgraded connection, client: 117.136.62.231,
2024/03/05 01:49:38 [error] 3219339#0: 10461341 send() failed (32: Broken pipe) while proxying upgraded connection, client: 39.144.228.100,
024/02/26 01:17:55 [error] 3219339#0: *9569074 send() failed (104: Connection reset by peer) while proxying upgraded connection, client: 221.222.21.192
2024/03/02 12:12:59 [error] 3219339#0: *10177168 send() failed (104: Connection reset by peer) while proxying upgraded connection