FlagdProvider default keep_alive_time=0 causes GOAWAY crash with flagd server
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- backend, networking
Línea de trabajo
Comienza en config.py, en DEFAULT_KEEP_ALIVE, y en grpc.py, en _generate_channel(); después, inspecciona cómo los tipos de resolver IN_PROCESS y RPC construyen sus canales. Decide si se debe aumentar el valor predeterminado o si se debe omitir la opción de keepalive cuando el valor sea cero. Se considera terminado cuando el valor predeterminado ya no provoca pings inmediatos, GOAWAY ni el fallo de ARM reportado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
The FlagdProvider defaults keep_alive_time to 0 (DEFAULT_KEEP_ALIVE = 0 in config.py), which is passed directly to grpc.keepalive_time_ms as a channel option.
In the Python gRPC C-core implementation, keepalive_time_ms=0 is interpreted as "send pings immediately / every ~1ms" rather than "disabled". This causes flagd's Go gRPC server to reject the connection with:
GOAWAY [ENHANCE_YOUR_CALM] "too_many_pings"
flagd's Go gRPC server uses the default grpc-go enforcement policy with MinPingInterval=5min. Any keepalive interval below 5 minutes triggers the GOAWAY.
Impact
- On aarch64/ARM (e.g., Raspberry Pi), the GOAWAY triggers a fatal gRPC C-core assertion failure in
ev_epoll1_linux.cc:Check failed: next_worker->state == KICKED— crashing the entire Python process - On x86_64, the client typically reconnects but logs repeated GOAWAY warnings, degrading performance and reliability
This affects both the IN_PROCESS and RPC resolver types since both create gRPC channels with the same keepalive options.
Reproduction
from openfeature.contrib.provider.flagd import FlagdProvider
from openfeature.contrib.provider.flagd.config import ResolverType
# Default keep_alive_time=0 → immediate crash/GOAWAY with flagd server
provider = FlagdProvider(
host="flagd",
port=8015,
resolver_type=ResolverType.IN_PROCESS,
)
flagd server logs:
Received a GOAWAY with error code ENHANCE_YOUR_CALM and debug data equal to "too_many_pings"
Client crash (ARM only):
F0000 00:00:1773608949.106482 38 ev_epoll1_linux.cc:1125] Check failed: next_worker->state == KICKED
Suggested Fix
Change the default from 0 to a value that respects flagd's server-side MinPingInterval of 5 minutes:
# config.py
DEFAULT_KEEP_ALIVE = 600000 # 10 minutes (ms) — above flagd's 5min MinPingInterval
Or alternatively, don't set grpc.keepalive_time_ms at all when keep_alive_time=0, letting the gRPC library use its own default (which is "infinite" / disabled in the C-core):
# grpc.py - _generate_channel()
options = []
if config.keep_alive_time > 0:
options.append(("grpc.keepalive_time_ms", config.keep_alive_time))
Workaround
Set keep_alive_time explicitly when creating the provider:
provider = FlagdProvider(
host="flagd",
port=8015,
resolver_type=ResolverType.IN_PROCESS,
keep_alive_time=600000, # 10 minutes
)
Or via environment variable:
FLAGD_KEEP_ALIVE_TIME_MS=600000
Environment
openfeature-provider-flagdversion: 0.2.7- flagd version: v0.13.2
- Python: 3.11 (aarch64-linux-gnu)
- grpcio: compiled with C-core (not pure-Python)
- Platform: Raspberry Pi 5 (ARM64)
- Lenguaje dominante
- Python
- Estrellas
- 27
- Forks
- 33
- Merge medio
- 1 d 17 h
- PR fusionados (30 d)
- 15
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de open-feature/python-sdk-contrib
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
open-feature/python-sdk-contrib#439 ·
Los mantenedores suelen responder en 1 día
-
UnleashProvider.track has the wrong signature: client.track raises TypeError instead of no-opPosiblemente ocupada @aepfli la tomó hace 25 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
open-feature/python-sdk-contrib#433 ·
Los mantenedores suelen responder en 1 día
-
Restore the .gitmodules branch pins so Renovate tracks flagd submodule versions againPosiblemente ocupada @aepfli la tomó hace 30 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
open-feature/python-sdk-contrib#421 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
open-feature/python-sdk-contrib#417 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
fix(flagd): use custom channel credentials in RPC resolverPosiblemente ocupada @tuhinkanti la tomó hace 9 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
open-feature/python-sdk-contrib#454 ·
Los mantenedores suelen responder en 1 día
Todos los issues de open-feature/python-sdk-contrib
Issues similares
-
[Bug]: Streamed /v1/chat/completions sends unredacted agent error text (keys) in the final chunkPosiblemente ocupada @rodricksz4h5 la tomó hoy. Abiertoarea/streaming comp/gateway P2 type/security
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
NousResearch/hermes-agent#138245 ·
Los mantenedores suelen responder en 1 día
-
[oblt-aw][autodoc] Update user onboarding guide for mandatory trigger CODEOWNERS stepPosiblemente ocupada @github-actions la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
correction metadata
Dificultad 2/5 Menos de una hora Aptitud para principiantes 68/100
acl-org/acl-anthology#10378 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
cloudtrail_multi_region_enabled_logging_management_events fails when the advanced event selector has a custom namePosiblemente ocupada @12YYCCYY16 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
prowler-cloud/prowler#13033 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
graygarbage/HermesKey#23 ·