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

Queue never retries with a smaller batch after HTTP 413; the whole batch is dropped after the max attempts

Aperta
#388 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 6 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
backend, testing

Direzione di ricerca

Start with src/Exceptionless/Queue/DefaultEventQueue.cs, especially the 413 handling and the loop exit at the cited lines; trace how the reduced batch size is used on the next iteration. Check src/Exceptionless/Extensions/FileStorageExtensions.cs to understand retry counts and cleanup. Reproduce with a fake ISubmissionClient that returns 413 above a chosen batch size; done when queued events are retried in smaller batches and only individually oversized events are discarded.

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

Descrizione

bug

In Exceptionless 6.2.0 (core Exceptionless package), when the server responds 413 (Request Entity Too Large), DefaultEventQueue.ProcessAsync lowers a local batchSize and logs "The event will be retried with a smaller batch size", but it then exits the loop immediately. The next run starts again at SubmissionBatchSize, so the smaller batch is never sent.

Where

What happens

  1. A batch of up to 50 events (the default SubmissionBatchSize) gets a 413.
  2. batchSize becomes 33, the batch is released, and the loop breaks.
  3. About 10 seconds later the timer runs ProcessAsync again, which starts at 50 again and resends the same oversized batch.
  4. Each attempt increments the queued files' attempt counter. Once they reach QueueMaxAttempts (default 3), CleanupQueueFiles deletes them.

The result is that every event in the batch is discarded, including events that would have been accepted in a smaller batch. A 413 also does not suspend processing, so the oversized request is resent on every timer tick until the events are deleted.

Expected

After a 413, the queue retries the same events with progressively smaller batches (down to 1). Only an event that is too large on its own is discarded.

Steps to reproduce

  1. Use a submission client (or a test ISubmissionClient) that returns 413 for any request with more than N events.
  2. Queue more than N events and call ProcessQueueAsync() repeatedly.
  3. Every request contains SubmissionBatchSize events. After 3 attempts the events are removed from the queue without being sent.

With the 6.2.0 package, a fake ISubmissionClient that returns 413 for more than 10 events, and 50 queued events, five calls to ProcessQueueAsync() send requests of [50, 50, 50] and then nothing: no smaller batch is ever tried and all 50 events are gone.

Suggested fix

Keep processing in the same run after a 413 (do not break when the batch was released only to shrink it), and/or keep the reduced batch size in a field so later runs use it. Consider not counting a 413 retry against QueueMaxAttempts.

Lingua principale
C#
Stelle
573
Fork
143
Merge medio
5g 9h
PR unite (30g)
1

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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 exceptionless/Exceptionless.Net

Tutte le issue di exceptionless/Exceptionless.Net

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.