Skip to content

Commit

Permalink
fix: 更新过程中服务间调用失败导致无损更新失效 TencentBlueKing#3242
Browse files Browse the repository at this point in the history
1.调整GracefulShutdown等待时间为40s,避免边界误差导致负载均衡缓存未刷新。
  • Loading branch information
jsonwan committed Oct 10, 2024
1 parent 13a34b5 commit 4a27be5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public void onApplicationEvent(AvailabilityChangeEvent<?> event) {
super.onApplicationEvent(event);
if (ReadinessState.REFUSING_TRAFFIC == event.getState()) {
// SpringCloud负载均衡缓存默认为35s,等待调用方缓存刷新后再真正关闭Spring容器
int waitSeconds = 60;
int waitSeconds = 40;
while (waitSeconds > 0) {
ThreadUtils.sleep(1000);
log.info("wait for GracefulShutdown, {}s left", waitSeconds--);
Expand Down

0 comments on commit 4a27be5

Please sign in to comment.