0

I want to decrease request timeout in IIS. I already read these links

How to increase request timeout in IIS?

Default Limits for Web Sites

my issue is when I have an ASP.Net Core website on IIS and set timeout in limits to 20 seconds, it will go to 120 seconds and wont stop after 20 seconds. How can I define on IIS if processing request took more than 10 or 20 seconds then timeout and kill the process or recycle the related application pool?

Mohammad Taherian
  • 1,622
  • 1
  • 15
  • 34
  • The closest setting is requestTimeout https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/aspnet-core-module?view=aspnetcore-3.1#attributes-of-the-aspnetcore-element IIS won't brutally kill the process or recycle it. – Lex Li Feb 03 '20 at 20:03
  • @LexLi Thank you for answer, I set that to 10 seconds but it seems it takes more than that time to get time out. It is not an on time event, right? Does Windows manage that to terminate it in a suitable time for OS or IIS? – Mohammad Taherian Feb 03 '20 at 22:52
  • Could you please tell me your asp.net core version? it seems that we could try to use KestrelServerLimits.KeepAliveTimeout Property to descrease the request timeout. More details, you could refer to this [answer](https://stackoverflow.com/a/48732873/7609093). – Brando Zhang Feb 04 '20 at 03:37
  • @BrandoZhang Thanks Brando for answer. I am using version 3.1. But I think this approach is same as first approach. I can set the first one on the server and this one in Program.cs. Am I right? – Mohammad Taherian Feb 04 '20 at 13:43
  • Yes, this setting is used to modify the kestrel's server timeout setting. For one of the asp.net core running mode, it will use the kestrel server to run the application. You could try to set it. – Brando Zhang Feb 05 '20 at 03:03

0 Answers0