grpc / grpc/grpc-java

StatusException: UNAVAILABLE on client when maxConnectionAge is set on server

Abierto
#9,566 27 comentarios 6 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
Java
Estrellas
12.1k
Forks
4k
Merge medio
2 d 17 h
PR fusionados (30 d)
37

Descripción

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Clona el proyecto grpc_poc enlazado y ejecuta Main.kt o ./gradlew run; después, lee README.md y el directorio logs. Reproduce la configuración del servidor maxConnectionAge y maxConnectionAgeGrace con respuestas grandes, comparando configuraciones bloqueantes y de coroutines. Se considera completado cuando el cliente deja de informar finalmente StatusException: UNAVAILABLE después de que el servidor envía GOAWAY.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java, kotlin
Área
backend-api-design, networking
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.