Skip to content

Camofox tab lifecycle: process exhausts after ~30 concurrent tests, no auto-restart #174

@cunninghambe

Description

@cunninghambe

Found in smoke #15

Camofox's browser process accumulates stale tabs across concurrent test waves. After ~30 tests at concurrency=4, `POST /tabs → 500: tab create timed out after 30000ms`. Subsequent waves all fail. Run summary: 23/860 tests ran on smoke #15's re-run before camofox died.

Fix options

  1. Per-page reset policy in BugHunter: BugHunter's `resetPolicy` should already enforce close-tab-after-test. Verify it's actually closing tabs — if so, the leak is in camofox.
  2. Camofox-mcp health check + restart: camofox-mcp could expose a `/healthz` that returns 503 when its tab pool is exhausted. BugHunter's pre-test check sees 503 → triggers a `pm2 restart camofox-browser` (or sends a SIGUSR1 to reset).
  3. PM2 max-restarts limit: tune the camofox pm2 config to max 50 tabs/process and auto-restart on exceed.

Recommend 1 first — confirm BugHunter is actually closing tabs. If yes, file follow-ups in camofox-mcp/camofox-browser repos.

Priority

High — gates large-scale runs on any real-world target.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions