StatusException: UNAVAILABLE on client when maxConnectionAge is set on server
- 主要言語
- Java
- スター
- 12.1k
- フォーク
- 4k
- 平均マージ
- 2日 17時間
- マージ済み PR(30日)
- 37
説明
### What version of gRPC-Java are you using?
1.49.0
Also grpc-kotlin 1.3.0
### What is your environment?
MacOS 12.5.1 with OpenJdk 17.0.2
Ubuntu 18.04.3 with OpenJdk 17.0.3
### What did you expect to see?
GRPC NettyServer is configured with `maxConnectionAge` of 1 second and `maxConnectionAgeGrace` of 300 seconds. Client sends requests with large response size (4 MB). Client receives responses successfully.
### What did you see instead?
Eventually the client throws `io.grpc.StatusException: UNAVAILABLE` after receiving `GOAWAY` from the server. We first saw this behavior with large request size on our production and testing environments running on Linux. Then we were able to reproduce using a minimal project with large response size on MacOS.
### Steps to reproduce the bug
* Clone the project from https://github.com/usischev/grpc_poc
* Run the `main()` function in `Main.kt`, or `./gradlew run`
* There are blocking and coroutine (kotlin) server and client configurations in the code, see README.md. All configurations trigger the exceptions eventually.
* Error logs can be seen in https://github.com/usischev/grpc_poc/tree/master/logs
コントリビューションガイド
調査の方向性
リンクされた grpc_poc プロジェクトをクローンし、Main.kt または ./gradlew run を実行してから、README.md と logs ディレクトリを読みます。大きなレスポンスを使ってサーバーの maxConnectionAge および maxConnectionAgeGrace 設定を再現し、ブロッキング構成とコルーチン構成を比較します。サーバーが GOAWAY を送信した後、クライアントが最終的に StatusException: UNAVAILABLE を報告しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, kotlin
- 領域
- backend-api-design, networking
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100