优雅关机问题 #14787
Unanswered
zhaowz-loctek
asked this question in
Q&A
优雅关机问题
#14787
Replies: 1 comment 1 reply
|
我们是使用k8s lifecycle prestop进行处理的(在真正执行kill之前,调用优雅停机接口,进行相关处理,包括nacos下线)。 |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
我用的版本是
spring-cloud-starter 3.0.0
spring-cloud-starter-ablibaba-nacos-discovery 2021.1
当我正常停止服务的时候,日志输出如下
可以看到 tomcat-shutdown是先于Nacos的De-registering,也就会发生如下情况:
tomcat停止服务了就是不能处理http请求了,但是由于某种原因阻塞了nacos的注销操作,导致naocs中服务还是一直在线的,请求还不断的转发到该服务,但是tomcat已经停了会直接报错。
我的疑问是正常不应是先从nacos注销后面再执行tomcat-shutdwon吗,能通过修改配置实现吗
All reactions