You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can see it seems that there is no real graceful shutdown implemented for the Listeners.
After sending a SIGTERM/SIGINT, HFC is not waiting for all current web requests to be processed, right?
This results in several exceptions when stopping HFC, e.g. ThreadAbortExceptions, e.g. when ServiceStack is being used.
Would it be possible to implement this in general?:
After receiving a SIGTERM/SIGINT, don't accept new incoming connections but answer with a dedicated http error code
After receiving a SIGTERM/SIGINT, still process the currently active requests
After all requests have been processed, finally shutdown the listener and exit the process.
The text was updated successfully, but these errors were encountered:
HyperFastCGI do it exactly the same way like ASP.NET does - aborts currently running threads and shuts down the application. If it will wait till all requests are served it will never be stopped in case of long-polling HTTP requests. Moreover some of thread aborts (for example reloading app domain when changing web.config) cannot be controlled by HyperFastCGI because are managed directly by mono implementation of System.Web and HyperFastCGI just be notified from System.Web that domain is unloading.
However it's possible to make improvement to stop receive incoming connections and wait some small amount of time after SIGTERM to process working requests.
Ok, thanks. Regarding long polling requests - it should be able to recognize these connections, right? these could/should be simply closed then, whereas non-long-polling ones should wait until they have been processed (which can take a while, e.g. 60s, I agree).
Maybe introducing the "graceful connection shutdown" behaviour could be introduced by an optional command line argument.
As far as I can see it seems that there is no real graceful shutdown implemented for the Listeners.
After sending a SIGTERM/SIGINT, HFC is not waiting for all current web requests to be processed, right?
This results in several exceptions when stopping HFC, e.g. ThreadAbortExceptions, e.g. when ServiceStack is being used.
Would it be possible to implement this in general?:
The text was updated successfully, but these errors were encountered: