Diagnostic step 1
Instrument FD growth: run lsof -p <PID> | wc -l over a reproducer to confirm leak rate and capture lsof output to identify FD types and paths.
Generated Oct 20, 2026, 9:41:02 AM
Instrument FD growth: run lsof -p <PID> | wc -l over a reproducer to confirm leak rate and capture lsof output to identify FD types and paths.
Audit upload/streaming handlers and replace manual piping with stream.pipeline(...) which auto-closes on errors; ensure you attach 'error' and 'aborted' handlers that call stream.destroy().
Wrap third-party streaming libraries with a small wrapper that ensures .destroy() is called on request 'close' and 'error'.
Temporarily enable more conservative keepAliveTimeout or disable keep-alive in the HTTP server to reduce FD retention while debugging.
Deploy changes to a staging environment and verify with a concurrency load test; monitor open FD count and ensure it stabilizes.