fix(audit-log-stream): remove AbortSignal.timeout to fix retry failures and memory pressure#5474
Conversation
…cross multiple provider factories
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Greptile OverviewGreptile SummaryThis PR fixes a critical issue with audit log streaming where retry attempts were failing due to conflicting timeout mechanisms. The change removes Problem identified: When Changes made:
Impact: This fix ensures retries work correctly with fresh timeouts per attempt, resolving memory pressure issues and allowing proper retry behavior when downstream services return errors like 503s. Confidence Score: 5/5
Important Files Changed
Last reviewed commit: a75dfb9 |
Context
Audit log streaming to external providers (Splunk, Datadog, Azure, Cribl, Custom) was causing memory pressure and
ERR_CANCELEDerrors when downstream services returned errors (e.g., 503s).Root cause:
AbortSignal.timeout()was used alongside axios'stimeoutoption. Whenaxios-retryretried failed requests, it reused the sameAbortSignalwhich had already started its countdown (or expired), causing immediate cancellation of retry attempts.Before: Retries failed with
ERR_CANCELED, accumulated timer handles caused memory pressure.After: Retries work correctly with fresh timeouts per attempt. The axios
timeoutoption is sufficient for request timeouts.Steps to verify the change
ERR_CANCELEDerrorsType
Checklist
type(scope): short description(scope is optional, e.g.,fix: prevent crash on syncorfix(api): handle null response).