0

I have a issue. I call 6 requests and have a timeout (without VPN) and stay like this for like 20 seconds. When I make the 7th request, and this one should work, it stays pending until the others resolve. It seems that the max pendingRequests is 6.

console.log($http.pendingRequests.length); // retuns 6 when I have 7 pending

Is there a way to increase this value?

1 Answers1

1

In general, this cannot be changed programatically. You can find a list of the browsers' default max concurrent requests per domain setting here. As a user, you can usually configure this value in the advanced settings section (e.g. about:config for Firefox) of your browser. However, unless you have control of the users' browsers (such as company deployments), that is likely not an option.

As a programmer without access to the browser config you basically have two options:

Either you distribute your http requests to different domains (which resolve to the same server), or you abort some of your first 6 requests using XMLHttpRequest.abort() (see here - exact usage may vary due to the framework you are using) and requeue them later on.

Daniel Klischies
  • 1,095
  • 7
  • 14