Many responses from IIS are ending in OperationCanceledException resulting in 500 Internal server error

☆樱花仙子☆ 提交于 2019-12-10 16:47:00

问题


We have one problem in a Production environment but we don’t see any issues in the local DEV environments.

Problem: I have one API - /api/GenerateAutoPdf/{Guid} (POST) Based on the response from this request we are opening a modal in the UI (Client). So if the response is 200 for the above POST request then the "Print modal" will open in the UI so that the user can select the generated PDF and then can print those generated PDF's from the modal.

If the response is 500 then the print modal will not open up, as there was a Internal server error.

In one scenario, even though the server responded with 500, the PDF's were generated but the "Print Modal" didn't show up as this was not a "200" OK response. The print modal didn't come up. This issue is really intermittent.

Question: While debugging the problem for finding the root cause for 500 error.

In the Event Viewer, I could see "OperationCanceledException" for this particular API request.

I went through some articles on finding the root cause for the "OperationCanceledException"

From most of them, the generic point was it might be due to client closing the browser window where the browser sends the cancellation token. But this is not the case and I am not able to reproduce the issue.

Additionally, there was a lot of "OperationCanceledExceptions" in the Event Viewer logs for different API's but for those, we are not really blocked. And this also tells that the user is not closing the browser window and also this is not happening for only some users where there could be browser issues with some users.

Does anyone have any inputs to resolve this or can you guys let me know the path forward for this issue or any tips for debugging this issue?

Does this issue occur when there are packet drops in the network?

Note: This is a server issue and client technology stack which we are using should not matter.

来源:https://stackoverflow.com/questions/55196506/many-responses-from-iis-are-ending-in-operationcanceledexception-resulting-in-50

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!