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
[Bug]: Trusted function deadlines retain a timer for every completed request #138
Start TrustedFunctions with timeoutMs:60000 and an immediate function returning new Response('hello'). Use node:async_hooks to track Timeout resources during 100 sequential execute calls, then yield one setImmediate.
Relevant output
100 live Timeout resources remain after all 100 calls complete. src/trusted-functions.ts:80-85 creates an unref timer inside Promise.race but never clears it when invoke wins. unref does not cancel a timer. Each completed call later also constructs/rejects a timeout error unnecessarily.
Expected: retain the timer handle and clearTimeout in finally on success and failure. A regression should assert timers return to baseline after successful calls. This is bounded by the configured timeout, not a permanent leak; at sustained load pending timers scale with request rate times timeout. No production RSS estimate is claimed.
Activity