Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

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

未關閉
#388 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 6 天內回覆

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
72/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
csharp
領域
backend, testing

研究方向

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.

由索引模型根據 Issue 內容生成。

描述

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.

主要語言
C#
星號
573
分支
143
平均合併
5 天 9 小時
30 天內合併 PR
1

環境準備

在 Codespaces 中開啟

在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

exceptionless/Exceptionless.Net 的其他 Issue

查看 exceptionless/Exceptionless.Net 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。