fix(Telemetry,HealthMonitor): bump task stacks to fix reboot-every-10min crash

TelemetryTask (4096B) overflowed its stack canary because
flushRuntimeToSD() nests ArduinoJson serialization + SD write + a
LOG_DEBUG call that fans out to Logging::log()'s 512B format buffer
and publishToMqtt()'s String + AsyncMqttClient::publish() — all on
the same small stack. Bumped to 8192B.

HealthMonitor's monitoring task shares the same nested-logging
pattern (11 LOG_* calls per health check pass) and was judged next
most likely to trip, so bumped 4096B -> 6144B pre-emptively.

RAM headroom confirmed fine post-bump (19.2%, 63KB/320KB used).
Root cause, other at-risk tasks, and the planned logging-queue
redesign are documented in feature-catalog.md F-051.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-16 09:22:11 +03:00
co-authored by Claude Sonnet 5
parent 326ae2b767
commit 838e206a82
3 changed files with 35 additions and 2 deletions
+4 -1
View File
@@ -43,7 +43,10 @@ bool HealthMonitor::begin() {
xTaskCreatePinnedToCore(
monitoringTask,
"HealthMonitor",
4096,
// 6144: performFullHealthCheck() logs once per subsystem (11 LOG_* calls per
// pass) — same LOG_DEBUG -> publishToMqtt() nesting that overflowed
// TelemetryTask's 4096B stack. See stack-audit notes.
6144,
this,
3, // Medium priority
&_monitoringTaskHandle,