Error Triage Hub (9)
ActionCable WebSocket Drops & Redis File Descriptor Exhaustion
Each open agent tab and widget session holds a persistent ActionCable socket backed by Redis pub/sub, exhausting default 1024 ulimit FDs or proxy timeouts.
Symptom: 1006 WebSocket Close | Limit: ulimit -n 1024 / Nginx 60s
How Agent Tabs & Live Chat Widgets Multiply Socket Descriptors
Every browser tab running Chatwoot opens an ActionCable WebSocket to Puma while Puma maintains Redis pub/sub subscriptions. At 50+ agents and 1,500+ concurrent website visitors, default container nofile limits (1024) or Nginx 60-second idle proxy timeouts drop live updates.
Distinguishing Nginx 60s Timeouts from Redis Client Caps
Check Nginx error logs for upstream timed out (110) and Redis INFO clients for rejected_connections. If WebSockets drop cleanly every 60 seconds during idle periods, Nginx proxy_read_timeout is terminating idle cable frames.
Measured Thresholds & Configuration
| Subsystem Limit | Default Failure Point | Production Target |
|---|---|---|
| Nginx proxy_read_timeout | 60s (drops idle ActionCable) | 300s - 3600s |
| Container ulimit -n (nofile) | 1024 open sockets | 65536 soft / hard |
| Redis maxclients | 10000 (capped by ulimit) | Verify INFO clients connected |