Reputation: 11
Does IE11 automatically abort AJAX requests if it takes too long to get a response? Using Angular4, I'm creating a fairly simple call:
this.http.post(url, requestJson, options)
.map((response: Response) => <string>response.json())
But, this runs for a pretty long time on the server before responding. What I'm experiencing is IE is aborting the request after 5 minutes. On Chrome, I don't see the request being aborted.
When the request aborts, I get the error: XMLHttpRequest: Network Error 0x2ef3, Could not complete the operation due to error 00002ef3. which, according to MS's documentation means ERROR_INTERNET_INCORRECT_HANDLE_STATE.
Looking at Wireshark, I'm seeing IE is sending a TCP reset at the same time.
I only experience this behavior talking with our server - the request is not aborted when running the site and server locally.
Is there a way to modify this timeout so that it does not abort? Note: A more long-term solution we'll work towards is modifying the behavior of this request so the request is not hanging for minutes before receiving a response (set up some kind of notification system for when long-running requests are done).
Things I've tried, that have not solved the problem:
Upvotes: 1
Views: 933
Reputation: 297
You might consider transitioning to Websockets or Long Polling if you are going to have long wait times. This seems like an appropriate application to move the client/server communication to something that is better suited to long delays in communication. I'm not sure why IE11 would behave like this, however, it sounds like you have a long wait and if the server gets loaded down even more at one time this can cause the response time to be further delayed. Is this an option for you?
Upvotes: 1