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
fix(aws-serverless): Keep the Lambda extension polling past 300s invocations
`/event/next` acknowledges the previous event and waits for the next one, so the
poll stays open for the whole of the following invocation. Node's `fetch` caps
that at undici's 300s `headersTimeout`, and the rejection escapes a loop with no
`try`/`catch` — the extension never asks for another event, and Lambda holds
every later invocation on that execution environment until the function timeout.
The poll now uses `http.request`, which has no default timeout, with a deadline
above the 900s Lambda ceiling so a stalled socket still settles. A failed poll is
retried with capped backoff instead of ending the loop, except for a 4xx, which
never starts working. Registration fails when the Extensions API returns 200
without an identifier rather than leaving the id null.
`next` returns the event so the loop stops on SHUTDOWN, which the extension
registered for and ignored. Failures are reported through `console`: `debug` is
only enabled from `Sentry.init`, which this process never calls.
Fixes#24218
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
0 commit comments