Nginx Reverse Proxy WebSocket Disconnects: 7 Common Traps and Reliable Fixes

If your WebSocket keeps reconnecting every few seconds, it’s usually not your app code. In most production incidents, the root cause is an incomplete reverse-proxy chain in Nginx (or one proxy layer before it). This guide gives you a copy-paste checklist to stabilize WebSocket connections fast. ...

February 18, 2026 · 3 min · mengboy

Nginx 反向代理 WebSocket 频繁断连:7 个高频坑与可复制修复

WebSocket 经常“连上又掉”,大多数不是后端代码锅,而是 Nginx 反代链路配置不完整。典型症状是前端反复重连、日志出现 upstream timed out、或者握手直接拿不到 101 Switching Protocols。 这篇给你一套能直接抄的排查与修复清单,按顺序做,通常 30 分钟内能稳定。 ...

February 18, 2026 · 3 min · mengboy