I wrote an express app with a single route. The handler saves the incoming request's body to a couchdb database.
I wrote a C# client app that sends 10000 small requests asynchronously using threads. Some of the requests fail with this exception message "No connection could be made because the target machine actively refused it".
I suppose this is because the node process reaches the max number of queued connections. Is that right?
This app is a proof of concept and I will not have such a big load in my real app but I want to tests the limits and understand how they work.
I have two questions:
Is there a way to control the max number of queued requests? Can I set it to "unlimited"? If not, what is the maximum and why is there a maximum?
In my node application, is there a way for me to catch and log those dropped requests? In a production app, I'd want to know that my server has reached the max number of requests.
More Info:
- I'm running this on Windows
- I have tried app.listen(3001, 'localhost', 10000) to set the backlog parameter. Same result.