Fix Guides // NodeFlow Diagnostics
Configuring 300s Reverse Proxy & Unbuffered SSE Streaming
Properly disabling proxy buffering and extending read timeouts to 300 seconds prevents premature 504/524 disconnects on multi-tool agent chains.
Measured Stack Telemetry & Memory Profile
Streaming LLM tokens and Socket.IO agent step logs requires HTTP/1.1 keepalives, Upgrade headers, and zero upstream buffering. Pair proxy tuning with Redis Queue Mode so non-streaming webhooks also complete cleanly.
| Subsystem / Signal | Measured Target | Operational Impact |
|---|---|---|
| proxy_read_timeout / send | 300s | Accommodates deep multi-agent tool loops |
| proxy_buffering | off | Flushes SSE tokens immediately to client |
| EXPRESS_TIMEOUT_MS | 300000 | Prevents Node Express from closing slow sockets |
Step-by-Step Triage & Config Remediation
- Disable upstream response buffering: Set proxy_buffering off and proxy_request_buffering off for large PDF uploads and SSE streams.
- Raise client_max_body_size: Set client_max_body_size 100M in Nginx so multi-PDF Document Store uploads do not fail with HTTP 413.
- Match Express app timeout: Set EXPRESS_TIMEOUT_MS=300000 inside Flowise .env so Node does not reset the socket before Nginx.
client_max_body_size 100M; proxy_read_timeout 300s; proxy_connect_timeout 60s; proxy_send_timeout 300s; proxy_buffering off;
Diagnostic FAQ
Why do large PDF uploads return 413 Request Entity Too Large?
Nginx defaults client_max_body_size to 1 MB; raise it to 100M alongside chunked batching.
Does Caddy handle SSE streaming automatically?
Caddy enables flush_interval -1 automatically for text/event-stream, though you should still raise transport read_timeout.