-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Implement an equivalent to AsyncTimeOutAttribute #2044
Comments
This will be a resource filter (wrapping) |
Scenarios:
|
This feature has been cut, so closing it. |
Is there guidance on how one can implement this? Can we just copy the code from previous mvc implementations? |
@roterdam - this is basically provided by the framework now https://msdn.microsoft.com/en-us/library/hh139229(v=vs.110).aspx I'd recommend creating a CTS with your desired timeout, and passing it into whatever you want to put a timeout around. If you can tell us more about your scenario we can give more specific guidance. |
@Eilon @danroth27 - not suggesting we do any work here - just reopening to keep track of the conversation. |
@rynowak Is there a way to change the execution limit for a specific controller method in the case of long-running queries? Need a way to run long queries (such as large inserts) without them being killed part way through... |
Closing this since there's no action item for us.
@douglasg14b - there's nothing to change because there is no execution time limit, this feature doesn't exist, you have all of the building blocks if you want to build it. |
Any long-running code terminates after exactly 120 seconds, returning a There definitely seems to be some sort of time limit on requests, and it has been a large hindrance on any requests that result in long running queries. Error Information:
Anything that runs for more than 120 seconds returns this error and seemingly stops running entirely. |
Then this is coming from IIS Express @Tratcher do you have any advice about this |
See requestTimeout https://docs.microsoft.com/en-us/aspnet/core/hosting/aspnet-core-module |
@Tratcher Thank you, that's good to know, and will be handy. However, is there a way to configure that for specific controllers and endpoints? I feel like it would be awkward for the entire website to have long timeouts when only a single endpoint needs it. |
Not at the moment. You need to raise the global limit as high as you need and then we can talk about how to add an additional timeout with a lower value on a per controller/action basis. This would be done by supplementing the HttpContext.RequestAborted CancellationToken with an additional timeout value, and possibly calling HttpContext.Abort() on timeout. |
Oh! I see, that makes sense. Thanks. |
We would like to be able to signal a timeout to the code below this. The design here is to call
request.Abort
Related to aspnet/HttpAbstractions#197
The text was updated successfully, but these errors were encountered: