Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disconnection with GOAWAY message when long idle #12

Open
hayarobi opened this issue Dec 15, 2021 · 0 comments
Open

disconnection with GOAWAY message when long idle #12

hayarobi opened this issue Dec 15, 2021 · 0 comments

Comments

@hayarobi
Copy link
Member

If heard client is idle so that only sends a keepalive pings to the server, the server send back the following message, and close connection in some times;
Received GOAWAY with ENHANCE_YOUR_CALM. Debug data: {}

According to the related information, there are two main causes, and both seem to be caused by the mismatch between the server and the client's grpc settings.
https://grpc.github.io/grpc/core/md_doc_keepalive.html

Currently, the server is using the default connection setting, so GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS is false, GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS is 300 seconds, but the heraj's GRPC settings are true and 300 seconds.
Even if GRPC_ARG_KEEPALIVE_TIME_MS time is set to be greater than 300 seconds, a problem still occurs due to the GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS setting value.

It is not yet clear whether this problem is the cause of the intermittent 'io.grpc.StatusRuntimeException:UNAVAILABLE:' error.

==================

클라이언트가 아이들 상태가 지속이 되어서 서버에 keepalive 핑만 보내다보면, 서버는 아래와 같은 메시지를 보내고나서 접속을 끊음
Received GOAWAY with ENHANCE_YOUR_CALM. Debug data: {}

관련 내용을 조사해보면 원인이 크게 두 가지 나오는데, 두 가지 모두 서버와 클라이언트의 grpc설정이 안 맞아서 발생하는 것으로 보임.
https://grpc.github.io/grpc/core/md_doc_keepalive.html

현재 서버는 기본 접속 설정을 사용하고 있어서 GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS는 false이고 GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS 는 300초인데, heraj의 커넥션은 이것에 대응하는 설정이 GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS는 true이고 GRPC_ARG_KEEPALIVE_TIME_MS는 서버와 동일한 300초로 하드코딩이 되어있음.
테스트로 GRPC_ARG_KEEPALIVE_TIME_MS 시간을 300초보다 크게 잡아도 GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS 설정값 때문에 여전히 문제가 발생함.

이 문제가 간헐적인 io.grpc.StatusRuntimeException: UNAVAILABLE: 에러의 원인인지는 아직 명확하지 않음.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant