[BUG]App Configuration pull refresh runs synchronously on the servlet request thread (Mono.just(refreshStores())); a slow or unavailable store blocks user requests
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 57/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- java, spring-boot
- Área
- backend, performance
Línea de trabajo
Start by reading AppConfigurationEventListener and AppConfigurationPullRefresh.refreshConfigurations() in the App Configuration config modules; the issue identifies the eager Mono.just(refreshStores()) call and the servlet event that triggers it. Trace the existing refresh tests and how they invoke store calls. Done means refresh checks no longer hold servlet request threads during slow store calls, with coverage showing the request can complete independently.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
With spring-cloud-azure-appconfiguration-config-web on the classpath and monitoring.enabled: true,
AppConfigurationEventListener handles every ServletRequestHandledEvent by calling
appConfigurationRefresh.refreshConfigurations().subscribe().
AppConfigurationPullRefresh.refreshConfigurations() is implemented as:
public Mono<Boolean> refreshConfigurations() {
return Mono.just(refreshStores());
}
Mono.just(...) evaluates its argument eagerly, so refreshStores() (which makes blocking HTTP calls to the
store) runs synchronously on the Tomcat request thread before .subscribe() is reached.
ServletRequestHandledEvent is published inside FrameworkServlet.processRequest before the response is
completed, so the client waits for the refresh too.
When the store is slow or unavailable, whichever user request happens to trigger the refresh check is held for
the full duration of the store call (up to the HTTP client's 60 s response timeout).
This looks like the same issue as #37018 (reported against 5.x). That issue was closed as stale, with a note that
v6 should fix it and to open a new issue if it didn't. It is still present in 7.4.0.
Versions
spring-cloud-azure-appconfiguration-config(-web): observed on 7.0.0, same code in 7.4.0 (latest)- Spring Boot 3.x, servlet stack (Tomcat), Java 21
Observed in production
- Normal: refresh check median ~20 ms, so the cost is invisible.
- Store returned HTTP 503 for ~40 min: each refresh check took 5–15 s (some 60 s). User-facing requests that
triggered the check took 18–32 s instead of milliseconds, even though the controller had already finished. - One case: the controller completed in ~33 ms and the response was sent after ~61 s (refresh timed out after 60 s).
To Reproduce
- Spring Boot servlet app with
spring-cloud-azure-starter-appconfiguration-config, monitoring enabled:spring.cloud.azure.appconfiguration.stores[0]: endpoint: https://<store>.azconfig.io monitoring: enabled: true refresh-interval: 30s triggers: - key: sentinel - Start the app, then make the store unreachable (e.g. drop outbound traffic to the store's IP, or point the hostname at a non-routable address).
- Wait >30 s, then call any endpoint (
GET /anything). - The response takes as long as the store call times out (~60 s), although the handler returned immediately.
Expected behavior
The refresh check must not block request threads. Either make the call actually asynchronous
(Mono.fromCallable(this::refreshStores).subscribeOn(Schedulers.boundedElastic()), or dispatch to an executor),
or run the check from a scheduler rather than from ServletRequestHandledEvent. A short, configurable timeout for
refresh calls would also help.
- Lenguaje dominante
- Java
- Estrellas
- 2.6k
- Forks
- 2.2k
- Merge medio
- 1 d 17 h
- PR fusionados (30 d)
- 259
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una 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 Azure/azure-sdk-for-java
-
mgmt, in track 1 migration guide, call out that file-based authentication method is not recommendedQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. AbiertoAzure.Identity
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
Azure/azure-sdk-for-java#48894 ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Azure/azure-sdk-for-java#51237 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Azure/azure-sdk-for-java#51221 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
[BUG] IllegalStateException when cancelling Service Bus session acquisition on a Reactor threadAbiertoClient customer-reported needs-team-attention question Service Attention Service Bus
Dificultad 4/5 3-5 días Aptitud para principiantes 56/100
Azure/azure-sdk-for-java#51213 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
[BUG] KeyVaultEnvironmentPostProcessor cannot load configured property-sources in Spring Boot 4 AOT / GraalVM native imagePosiblemente ocupada @moarychan la tomó hace 1 día. Abiertoazure-spring bug Client customer-reported needs-team-attention
Azure/azure-sdk-for-java#51209 · 2 comentarios · 2 reacciones · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de Azure/azure-sdk-for-java
Issues similares
-
bug emitter:client:csharp
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
microsoft/typespec#12572 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Los mantenedores suelen responder en 1 día
-
[Bug] RemotingHelper.connect swaps the socket send and receive buffer configurationPosiblemente ocupada @amalsaidov la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
needs-area-label
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
area/ai area/backend component/zeebe kind/task
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día