Goal
Improve renderer stability under concurrency: prevent leaks, handle crashes, and avoid “stuck” Chrome sessions.
Why
Headless Chrome is powerful but brittle at scale. Most production issues will be lifecycle + concurrency related.
Scope
- Ensure every request reliably:
- creates/borrows a page/session
- closes it on success and on every error path
- respects context cancellation
- Add safeguards:
- max concurrent pages
- watchdog: restart browser on repeated failures
- detect and recover from “Chrome died” mid-request
- Add lightweight instrumentation:
- counters for active pages
- render duration histogram (if metrics exist)
Acceptance criteria
Notes / hints
Pair this with the improved load test issue so you can validate fixes.
Goal
Improve renderer stability under concurrency: prevent leaks, handle crashes, and avoid “stuck” Chrome sessions.
Why
Headless Chrome is powerful but brittle at scale. Most production issues will be lifecycle + concurrency related.
Scope
Acceptance criteria
Notes / hints
Pair this with the improved load test issue so you can validate fixes.