Skip to content

[Bug] Chrome browser self-healing and health monitor in container #46

Closed

Description

@Piboonsak

Chrome Browser Self-Healing + Health Monitor

Mirror of: Piboonsak/Openclaw#38

Problem

The Chrome/Chromium browser service inside the Docker container sometimes crashes or fails to start. There is no self-healing mechanism or health monitoring for the browser process.

Requirements

  1. Health monitor — periodically check if the browser process is alive
  2. Auto-restart — if the browser process dies, automatically restart it
  3. Startup verification — on container start, verify browser launches successfully before accepting requests
  4. Logging — log browser health events (start, crash, restart) for debugging
  5. Graceful degradation — if browser cannot be restarted after N attempts, disable browser-dependent features and log a clear error

Implementation approach

  • Add a health monitor module (e.g. src/infra/browser-health.ts)
  • Integrate with the existing container startup sequence
  • Use process supervision (child_process or similar) to manage the browser lifecycle
  • Add configurable retry limits and intervals

Files to create/modify

  • src/infra/browser-health.ts (new) — browser health monitor
  • src/infra/index.ts — export the health module
  • Dockerfile — ensure Chromium is properly installed with self-healing entrypoint
  • Tests for the health monitor logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions