Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Http4s Blaze Client wait queue full failure

Aperta
#630 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
scala

Direzione di ricerca

Inizia da BlazeClientBuilder e dalla sua configurazione withMaxWaitQueueLimit, quindi traccia PoolManager e WaitQueueFullFailure in presenza di molte richieste GET in uscita concorrenti. Riproduci lo stato di coda piena usando http4s-blaze-client 0.21.0-M6 e determina se le richieste lente o scadute impediscono il recupero. Il lavoro è completato quando sono disponibili una causa comprovata e una modifica chiaramente circoscritta per il recupero o la limitazione delle richieste.

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

Descrizione

module:blaze-client

We have a use case where for a single incoming request, a microservice has to make many(in the order of 1000s) outgoing HTTP calls to other microservice to fetch GET some details. Our service is built using Scala, Http4s and Cats-Effect and is using http4s-blaze-client library for making outbound HTTP calls.

Currently in production we are seeing the failure org.http4s.client.WaitQueueFullFailure: Wait queue is full and org.http4s.client.PoolManager: Max wait queue limit of 1024 reached, not scheduling. Once the service goes into this state, its never recovering from it and we are completely blocked.

Below is the Blaze Client configuration we are using:

BlazeClientBuilder[F](global)
  .withMaxWaitQueueLimit(1024)
  .withRequestTimeout(20.seconds)
  .resource
  .map { client =>
      ResponseLogger(logHeaders = false, logBody = true)(
      RequestLogger(logHeaders = true, logBody = true, redactHeadersWhen = Middleware.SensitiveHeaders)(client)
    )
  }

Initially we were using the default setting of 256 for max wait queue limit but then decided to increase to 512 and then to 1024. Currently even the 1024 is not working.

I am not sure if this happens when the outbound HTTP request is slow or times out. There is a possibility that the API response is slow sometimes(but that will still return within 20seconds timeout that we set). But I do not have sufficient evidence to claim that it is the case here.

We are currently using the version http4s-blaze-client_2.13:0.21.0-M6.

I am not sure if increasing the wait queue size further would help. Is it possible to implement custom logic within the service to check the wait queue size and wait before submitting the request to the client? Please advise how to get around with this issue. Any help would be really appreciated.

Lingua principale
Scala
Stelle
371
Fork
63
Merge medio
2g 5h
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di http4s/blaze

Tutte le issue di http4s/blaze

Issue simili

Altre issue su Scala

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.