7
Spring Cloud Consul 注册丢失
source link: https://www.v2ex.com/t/789934
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
项目采用 consul 作为注册中心, 服务跑了一段时间后,某些服务就从注册中心消失,无法被其他服务访问,但服务本身还是正常的,内部直接 /actuator/health 返回的也是 UP
消失基本都是在服务接收到大量外部连接的时候。
该怎么排查这个问题,目前没有日志看到服务注册断开。
4 条回复 • 2021-07-17 07:35:56 +08:00
th00000 1 天前
线上跑了好久了 没出过你这个问题, Consul 如果健康检查通过应该不会出现摘掉服务的情况
你访问 health check api 没问题的时间不代表 Consul 访问的时候没问题
服务流量大的时候 health check api 可能来不及响应
你应当先查服务的监控, 看当时 CPU 占用是怎样的, JVM 是怎样的, GC 有没有问题, 有没有 STW 时间过长, 超过了 health check 的 timeout
你访问 health check api 没问题的时间不代表 Consul 访问的时候没问题
服务流量大的时候 health check api 可能来不及响应
你应当先查服务的监控, 看当时 CPU 占用是怎样的, JVM 是怎样的, GC 有没有问题, 有没有 STW 时间过长, 超过了 health check 的 timeout
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK