Feature #1618

Graceful Server Shutdowns

Added by Pavan Rikhi 11 months ago. Updated 11 months ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:Pavan Rikhi% Done:

0%

Category:ServerSpent time:-
Target version:v2.0.0 - Post-Migration Issues
Easy Pickings:

Description

Handle kill signals, allowing requests to finish, database connections to close, and logging buffer to be flushed.


Related issues

Related to SESE Website - Feature #1160: Better Exception Procedure Closed

History

#1 Updated by Pavan Rikhi 11 months ago

  • Target version changed from v1.00.00 - Deployment to v1.03.00 - Avalara & Server Improvements

#4 Updated by Pavan Rikhi 11 months ago

#6 Updated by Pavan Rikhi 11 months ago

  • Target version changed from v1.03.00 - Avalara & Server Improvements to v2.0.0 - Post-Migration Issues

Ugh, can't do this because of this network bug:
https://github.com/yesodweb/wai/issues/691

So it'll have to wait until we update to LTS 11.18 or higher

#7 Updated by Pavan Rikhi 11 months ago

Pavan Rikhi wrote:

Ugh, can't do this because of this network bug:
https://github.com/yesodweb/wai/issues/691

So it'll have to wait until we update to LTS 11.18 or higher

But basically, what I tried was a setInstallShutdownHandler of

installHandler sigTERM (CatchOnce $ do log "Shutting Down" >> closeConnections >> destroyAllResources dbPool >> etc >> etc) Nothing

with logging output on shutdown process & closing of socket, pools, & loggersets.

Along with a call to setGracefulShutdownTimeout to put a max time on the shutdown.

Also available in: Atom PDF