OL Learn

Node.js server input number of concurrent connections limit

How many concurrent connections can Node.js input handle? How can we increase max number?
We are using Connect 2020.1
We implemented node.js service endpoint, to preview pdf. When we tested, it was all fine. When we deployed it in production, the node.js service started falling intermittently. I haven’t analysed network traffic, but requests don’t seem to hit the workflow service (we can’t see the files in the folder).

On clients end we open one http connection per client and never close, per Microsoft recommendations.

Perhaps, Connect node.js server has limit on how many concurrent connection it can handle. Do you know if there is any setting where we we can increase that limit? Will it help if we increase the resources on the server?

I don’t believe Node restricts the number of concurrent connections anymore (I think it used to, years ago, but it no longer does).

Windows has a limit of 1024 concurrent temporary ports. Node is therefore limited to even less than that since other applications are also using some of those ports. There are other Operating System limitations as well. Those limitations are possibly the cause of the issues you’re experiencing.

Search the web for articles on the subject, you will find plenty of information (sometimes contradictory!) about it.

But before jumping to conclusions, you must first analyze the logs (both for Node and Workflow) to make sure the issue isn’t with your configuration or with your processes.