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
At the moment, graceful shutdown is triggered directly by the reactive and servlet application contexts. This works well in isolation but has some drawbacks when other components want to participate in a graceful shutdown. Some of these drawbacks are described by @gnagy in #4657 (comment).
We'd like to explore reworking the management of a WebServer's lifecycle and integrating it with the application context's lifecycle processing by implementing SmartLifecycle. This would make the grace period that's currently configured via server.shutdown.grace-period more general . server.shutdown.grace-period could be replaced by a new property, spring.lifecycle.timeout-per-shutdown-phase, that maps onto the timeoutPerShutdownPhase property of DefaultLifecycleProcessor. We'd then need a new property that can be used to make the web server opt in to graceful shutdown rather than shutting down immediately as it does in 2.2. Something like server.shutdown.type that is a enum with IMMEDIATE and GRACEFUL values.
The text was updated successfully, but these errors were encountered:
Having proper support would be great! It would be good if command-line applications (e.g. used as cronjobs) can also use the IMMEDIATE shutdown option. This would allow them to shut down cleanly while still being able to flush async logging etc. Since these types of apps don't typically need a webserver it would be very nice if this shutdown behaviour can be decoupled from the webserver part.
At the moment, graceful shutdown is triggered directly by the reactive and servlet application contexts. This works well in isolation but has some drawbacks when other components want to participate in a graceful shutdown. Some of these drawbacks are described by @gnagy in #4657 (comment).
We'd like to explore reworking the management of a
WebServer
's lifecycle and integrating it with the application context's lifecycle processing by implementingSmartLifecycle
. This would make the grace period that's currently configured viaserver.shutdown.grace-period
more general .server.shutdown.grace-period
could be replaced by a new property,spring.lifecycle.timeout-per-shutdown-phase
, that maps onto thetimeoutPerShutdownPhase
property ofDefaultLifecycleProcessor
. We'd then need a new property that can be used to make the web server opt in to graceful shutdown rather than shutting down immediately as it does in 2.2. Something likeserver.shutdown.type
that is a enum withIMMEDIATE
andGRACEFUL
values.The text was updated successfully, but these errors were encountered: