You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: bound log-tail throttling backoff and recover the polling interval #9403
Make sam logs --tail recover predictably after throttling, for both CloudWatch Logs and X-Ray data. The current pollers repeatedly square their interval: starting from the default one second, five consecutive throttles produce delays of 2, 4, 16, 256, 65536 seconds. A successful poll does not restore the original interval, so transient throttling can leave a live tail effectively stalled.
Proposal
Double the interval after each throttle, with a 60-second ceiling.
Restore the configured interval after a successful poll, including a successful empty response.
Preserve explicitly configured intervals longer than 60 seconds by using the larger of 60 seconds and that interval as the ceiling.
Apply the same policy to CloudWatch Logs, X-Ray traces and X-Ray service graphs. This needs no SAM Spec or CLI option changes.
With the default interval, sustained throttling would wait 2, 4, 8, 16, 32, 60, 60, ... seconds. A successful poll would resume the one-second interval.
Additional Details
Reproduced at 9e92728fe6e965bfa9e4cfa3151adf9c9f1f9de3 without AWS calls or actual sleeping:
Current output: [2, 4, 16, 256, 65536]. The final delay alone is over 18 hours. The X-Ray base poller has the same delay logic.
The proposed ceiling is for the tailer's polling loop, in addition to any retries performed inside the AWS SDK. Verification can use simulated throttle/success responses and a patched clock; no live service load is needed.
Opened #9404 with bounded doubling backoff for CloudWatch and X-Ray tailing, plus restoration of the configured interval after successful polls. Eight new regression cases cover sustained throttling, recovery and custom intervals. The full make pr run passed with 9,766 tests and 94.09% coverage.
Opened #9413 as a follow-up to the review of #9404. It recognizes X-Ray's actual ThrottledException (HTTP 429), so trace and service-graph tails back off instead of terminating.
The PR adds botocore Stubber coverage for GetTraceSummaries, BatchGetTraces, and GetServiceGraph, verifies that access denied after a throttle raises without another sleep across all three pullers, and clarifies the retry warnings. Full Linux make pr passed with 9,777 tests and 94.14% coverage; the resolved combination with #9404 also passed 179 affected tests locally.
#9404 remains the bounded-backoff change. #9413 targets current develop independently; its description notes the small conflict resolution needed when combining the two. Interruptible waits remain separate.
Thanks for the precise repro. Squaring the interval on every throttle (2→4→16→256→65536 s) is clearly unintended, and doubling with a cap plus resetting on success is the right fix. We'll review #9404 first and then #9413, which depends on it in practice. We'll check that the merged pair keeps an explicit --interval above 60 s working as you described.
Activity
vinsymoyya commentedon Nov 5, 2026
Opened #9404 with bounded doubling backoff for CloudWatch and X-Ray tailing, plus restoration of the configured interval after successful polls. Eight new regression cases cover sustained throttling, recovery and custom intervals. The full
make prrun passed with 9,766 tests and 94.09% coverage.vinsymoyya commentedon Nov 9, 2026
Opened #9413 as a follow-up to the review of #9404. It recognizes X-Ray's actual
ThrottledException(HTTP 429), so trace and service-graph tails back off instead of terminating.The PR adds botocore
Stubbercoverage forGetTraceSummaries,BatchGetTraces, andGetServiceGraph, verifies that access denied after a throttle raises without another sleep across all three pullers, and clarifies the retry warnings. Full Linuxmake prpassed with 9,777 tests and 94.14% coverage; the resolved combination with #9404 also passed 179 affected tests locally.#9404 remains the bounded-backoff change. #9413 targets current
developindependently; its description notes the small conflict resolution needed when combining the two. Interruptible waits remain separate.bnusunny commentedon Nov 13, 2026
Thanks for the precise repro. Squaring the interval on every throttle (2→4→16→256→65536 s) is clearly unintended, and doubling with a cap plus resetting on success is the right fix. We'll review #9404 first and then #9413, which depends on it in practice. We'll check that the merged pair keeps an explicit
--intervalabove 60 s working as you described.