Skip to content

Commit

Permalink
Update graceful-shutdown.md (#2627)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfordjody committed May 23, 2023
1 parent f6f244f commit 33dab77
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ title: 优雅停机
type: docs
weight: 2
---






## 特性说明

优雅停机是指服务实例能安全平稳的停止,对进行中的业务不产生影响。
Expand All @@ -26,7 +20,7 @@ weight: 2
1. 通过 `kill PID` 停止服务
2. 通过 SpringBoot Actuator 的 `/shutdown` 停止服务

Dubbo 3.0 及以上版本支持不同类型的Java应用,包括 SpringBoot 应用、 Spring 应用、非 Spring 应用。
> Dubbo 3.0 及以上版本支持不同类型的Java应用,包括 SpringBoot 应用、 Spring 应用、非 Spring 应用。
## 使用方式

Expand All @@ -37,7 +31,7 @@ Dubbo 3.0 及以上版本支持不同类型的Java应用,包括 SpringBoot 应
dubbo.service.shutdown.wait=30000
```

## 注意事项
{{% alert title="注意事项" color="primary" %}}

1. Dubbo 是通过 JDK 的 ShutdownHook 来完成优雅停机的,所以如果用户使用 `kill -9 PID` 等强制关闭指令,是不会执行优雅停机的,只有通过 `kill PID` 时,才会执行。

Expand All @@ -55,4 +49,5 @@ server:
5. 如果 ShutdownHook 不能生效,可根据具体场景自行调用:
```java
ApplicationModel.defaultModel().destroy();
```
```
{{% /alert %}}

0 comments on commit 33dab77

Please sign in to comment.