Yes, it could be related to how Node.js handles concurrent operations. Node.js uses an event-driven, non-blocking architecture, but CPU-intensive tasks can block its event loop and delay other incoming requests.
For example, processing large files, generating complex reports, or performing expensive calculations synchronously can affect the entire application.
To investigate the problem:
- Avoid synchronous operations such as
fs.readFileSync() in request handlers.
- Use asynchronous database queries and file operations.
- Check whether any API requests are taking too long.
- Monitor CPU and memory usage during peak traffic.
- Move CPU-intensive tasks to background workers where supported.
- Consider a more suitable hosting environment if your application requires multiple processes.
The important thing is to identify which operation is blocking the event loop instead of assuming that Node.js cannot handle multiple users.