Dubbo is graceful shutdown through the ShutdownHook
of the JDK, so graceful shutdowns are not performed if you force shutdown the command, such as kill -9 PID
, and will only be executed if kill PID
is passed.
Set graceful shutdown timeout, the default timeout is 10 seconds, if the overtime is forced to close.
# dubbo.properties
dubbo.service.shutdown.wait=15000
If ShutdownHook does not take effect, you can call it yourself, in tomcat, it is recommended by extending the ContextListener and call the following code for graceful shutdown:
DubboShutdownHook.destroyAll();
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.