mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-02 21:40:14 +00:00
Root Cause: The classifyError() function in tempproxy/client.go was returning nil when err was nil, even if respError contained "rate limit exceeded". This caused the retry logic to treat rate limit errors as retryable, triggering 3 retries with exponential backoff (100ms, 200ms, 400ms) for each rate-limited request. With multiple nodes polling simultaneously and hitting the proxy's 1 req/sec default rate limit, this created a retry storm: - 3 nodes polling every 10 seconds - 1-2 requests rate limited per cycle - Each rate limit triggered 3 retries - Result: 6+ extra requests per cycle, causing temperature data to flicker in and out as requests were dropped Solution: 1. Reordered classifyError() to check respError first before checking if err is nil, ensuring rate limit errors are properly classified 2. Added explicit rate limit detection that marks these errors as non-retryable 3. Added stub EnableTemperatureMonitoring/DisableTemperatureMonitoring methods to Monitor for interface compatibility Impact: - Rate limit retry attempts reduced from 151 in 10 minutes to 0 - Temperature data now stable for all nodes - No more flickering temperature displays in dashboard |
||
|---|---|---|
| .. | ||
| client.go | ||