Skip to content

[consul Registry]: When grpc enters idle mode, “last connection error” occurs on the client and cannot be recovered #3185

@duc-cnzj

Description

@duc-cnzj

What happened:

When grpc enters idle mode, A last connection error occurs on the client and cannot be recovered.

What you expected to happen:

needs to continue to watch the latest instance of the service

How to reproduce it (as minimally and precisely as possible):

Bff grpc client adds WithIdleTimeout option
image

after 5 seconds, Restart the server grpc service, pod ip changes,But the client is no longer updated

image-20240119215331303

Anything else we need to know?:

Before entering idle
image-20240119104636822

After entering idle

image-20240119131138921

When grpc enters idle mode, watcher.Stop() Called and <-ctx.Done()

image-20240119214610867

Environment:

  • k8s
  • kratos: v2.7.2
  • consul: v1.10.3
  • Kratos version (use kratos -v):
  • go version go1.21.1 darwin/arm64

PR

fix: 当grpc结束闲置模式的时候,需要继续去获取服务的最新实例 #3162

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions