Synchronous file operations block event loop for all requests
criticalperformanceUpdated Feb 8, 2026(via Exa)
Technologies:
How to detect:
Using synchronous file system operations (fs.readFileSync, fs.writeFileSync) inside request handlers blocks the entire event loop, preventing all concurrent requests from processing.
Recommended action:
Replace fs.readFileSync with fs.readFile callback or fs.promises. For static config files, read once at startup and serve from memory. Never use synchronous I/O in the request path.