Skip to content

v3.12.x: monotonic ~450B heap decline per HTTP request (not seen on v3.6.0) #482

Description

@macdylan

Environment

  • ESP32-C3 (arduino-esp32 3.2.1 / IDF 5.4), ESPAsyncWebServer v3.12.1 + AsyncTCP 3.5.0
  • Responses served via beginResponse(contentType, contentLength, AwsResponseFiller) callback streaming (PROGMEM bodies, ETag/304)
  • Idle free heap identical to v3.6.0 (~41.7KB, largest block ~22.5KB) — the difference appears under request load

Observation

Six sequential full-body 200 fetches (one at a time, ~1s apart), free heap read via /about after each:

37020 -> 36804 -> 36344 -> 35876 -> 35648 -> 35172 -> 34744

A monotonic ~400-500B decline per request that does not recover within minutes. On v3.6.0 the same app was verified flat across 40 sequential fetches, so this looks specific to the v3.10-v3.12 response/request refactor (shared_ptr / std::function chains, new response object model).

On a heap-tight device (~42KB total) this compounds quickly: within ~60 requests the largest free block drops below our serve threshold and every large asset answer turns into 503s.

Extra data point

During the same bench session one spontaneous reboot occurred (RTC_SW_CPU_RST) with no panic captured — no stack available, mentioned only in case it rings a bell alongside the memory issue.

Happy to run any instrumented build or provide our bench scripts (settle >130s methodology rules out lwip TIME_WAIT retention — the decline persists well inside the TIME_WAIT window and monotonically).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions