Blocked event loop in Node.js server mimicked a firewall, stumping network diagnosis
A developer running a nixamp media server in Montreal encountered a baffling issue where port connections completed TCP handshakes but returned no data, closely resembling a firewall or middlebox block. Investigation ruled out upstream packet filtering by confirming that a genuinely closed port received no handshake, proving TCP traffic was reaching the server process itself. The real cause was a synchronous ffprobe tagging loop scanning 5,712 media files that monopolised the Node.js event loop for several minutes, preventing the server from reading any incoming requests despite appearing fully operational. Introducing a single 'setImmediate' yield per file iteration restored normal responsiveness, bringing health-check responses down to under 600 milliseconds. A secondary issue of choppy audio was also traced to the server pushing the full track list — roughly 470 KB of JSON — to clients twelve times per second, overwhelming the audio-decoding thread.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in