jjmerelo
jjmerelo

Reputation: 23477

Throttling express server

I'm using a very simple express server, with a PUT and GET routes on an Ubuntu machine, but if I use several clients (around 8) doing requests at the same time it very easily gets flooded and starts to return connect EADDRNOTAVAIL errors. I have found no way to avoid this other than reducing the number of requests per client, but is there a way to throttle answers on the server so that instead of returning error it queues petitions and serves them in due time? Maybe it's better to check whether there are answers to requests on the client and not insert new ones if they have not been served? Client is here

Upvotes: 1

Views: 1626

Answers (1)

hereandnow78
hereandnow78

Reputation: 14434

Queuing seems to be wrong, you should first check your current ulimit (every connection needs a handle).

To solve your problem, just change the ulimit.

Upvotes: 2

Related Questions