grpc / grpc/grpc-java

StatusException: UNAVAILABLE on client when maxConnectionAge is set on server

Aperta
#9,566 27 commenti 6 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
Java
Stelle
12.1k
Fork
4k
Merge medio
2g 17h
PR unite (30g)
37

Descrizione

### 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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Clone the linked grpc_poc project and run Main.kt or ./gradlew run, then read README.md and the logs directory. Reproduce the server maxConnectionAge and maxConnectionAgeGrace configuration with large responses, comparing blocking and coroutine setups. Done means the client no longer eventually reports StatusException: UNAVAILABLE after the server sends GOAWAY.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java, kotlin
Ambito
backend-api-design, networking
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.