Menu

Nginx reverse proxy dropping WebSocket check-in events under burst load in Docker Compose
πŸ“°

Nginx reverse proxy dropping WebSocket check-in events under burst load in Docker Compose

DEV CommunityΒ·HabeebΒ·11 days ago
#H8SmsrLs
#dev#nginx#upstream#connection#host
Long article (273 words) β€” no AI summary yet.
Reading 0:00
15s threshold

Hi everyone,

We're running an on-prem microservice stack on Debian 12 (Docker Engine 26.1, kernel 6.1.0-21-amd64) behind an Nginx reverse proxy to handle front-desk reception kiosks and badge printers.

As part of deploying an on-prem visitor management system across our main lobby terminals, each kiosk maintains a persistent WebSocket connection (wss://) to a Node.js event gateway backed by Redis Pub/Sub for instant badge-print triggers and host notifications.

Expected Behavior

During morning check-in bursts (around 40–60 concurrent badge scans per minute), WebSocket connections should stay persistent and route events cleanly through Nginx to the upstream Node container.

Actual Behavior

Under burst load, kiosks randomly disconnect with code 1006 and fail to receive print-job ACKs for ~15–20 seconds before reconnecting.

Relevant snippet from /var/log/nginx/error.log:

text

2026/11/25 08:42:11 [error] 29#29: *1482 upstream prematurely closed connection while reading response header from upstream,…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.