有人在把 Nginx 放在一个小型 Node.js API 前面之后遇到过随机的 502 错误吗?在本地运行一切正常,但在 VPS 上即使是轻度流量,上游偶尔也会超时。检查了日志也没有发现明显问题。不知道是不是和 keepalive 或 proxy buffer 有关。
Original
Has anyone run into random 502 errors after putting Nginx in front of a small Node.js API? Works fine locally, but under light traffic on the VPS the upstream occasionally times out. Checked logs and nothing obvious. Wondering if it's keepalive or proxy buffer related.