Does not support concurrent requests
See original GitHub issueI am writing a node app that caches data from several different sharepoint collections, but problems occur when you perform simultaneous requests (I have each data endpoint caching concurrently). It seems as though the last request overrides any requests that have not yet completed. All requests will complete and call their callback function, but each callback contains the data from the last request made.
When running each request after the previous has returned, the issue does not arise, it is only when there are multiple requests made at a time.
var request = require('node-http-ntlm');
var urls = [
'url1', //Returns 'data1'
'ur2', //Returns 'data2'
'url3' //Returns 'data3'
];
var opt, i;
for(i in urls){
opt = {
url: urls[i],
//..credentials
}
request.get(opt, function(err, res){
if(err){
console.info(err);
}else{
console.info(res);
}
});
}
Should print (in no particular order, depending on which requests return first):
data1
data2
data3
actual output is
data3
data3
data3
Issue Analytics
- State:
- Created 9 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
WebClient does not support concurrent I/O operations
The WebClient only supports a single operations, it cannot download multiple files. You haven't shown your code, but my guess is that you...
Read more >WebClient does not support concurrent I/O operations - MSDN
I have some code, that fires async calls multiple times, but I only do this from the DownloadStringCompletedEvent.
Read more >Handling Concurrent Requests in a RESTful API - Medium
The problem is very simple: users A and B requested a resource more or less at the same time, and got the same...
Read more >STPPaymentHandler does not support concurrent calls to its ...
We have a user that is unable to complete a payment. After completing the 3d secure flow the user receives the following error...
Read more >What to Do When Concurrent Requests Are Not Processing ...
Oracle Concurrent Processing - Version 11.5.10.2 to 12.2.7 [Release 11.5 to 12.2]: Concurrent Processing: What to Do When Concurrent ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry @SamDecrock, any thoughts on the above?
I’m using
setImmediate()
in my code. This means that requests can be interrupted by other events. I suppose the server can’t handle 3 concurrent authentications from the same client.I suppose you don’t really want to authenticate 3 times. Can’t you authenticate once and the use the received cookies to stay in the session.