Skip to content

Browser renderer processes accumulate without cleanup, causing OOM and browser control timeout #29685

@davshen

Description

@davshen

What happened?

When the agent uses the built-in browser tool to visit web pages, Chromium renderer processes are created for each page but never cleaned up after the task completes. Over time, this leads to unbounded memory growth and eventually the browser control service becomes unreachable.

Error message: Can't reach the OpenClaw browser control service (timed out after ...)

After moderate usage (a few hours), one of our pods accumulated 39 Chromium renderer processes, consuming 3.8GB of memory (out of a 4Gi limit). A healthy pod with light browser usage has only 3 renderer processes and uses ~714Mi.

Pod Renderer Processes Memory Usage
Light usage 3 714Mi
Heavy usage 39 3798Mi

Steps to reproduce

  1. Deploy OpenClaw Gateway in a container with a 4Gi memory limit
  2. Connect via Feishu (or any channel) and ask the agent to visit various web URLs over time
  3. The agent uses the browser tool to open pages, reads the content, and responds
  4. After each task completes, the Chromium renderer processes remain alive
  5. Eventually memory is exhausted and browser control service times out

Expected behavior

After the agent finishes a task that involved browser navigation, the opened browser tabs/pages should be automatically closed and the associated renderer processes should be terminated. Ideally:

  1. Automatic tab cleanup after each agent turn completes
  2. A configurable limit on maximum concurrent browser tabs/renderer processes
  3. Idle tab timeout — tabs inactive for N minutes should be auto-closed

Environment

  • OpenClaw version: 2026.2.24 (df9a474)
  • OS: Debian GNU/Linux 12 (bookworm), Kubernetes StatefulSet pods
  • Chromium version: 145.0.7632.109
  • Container memory limit: 4Gi
  • Shell: bash

Workarounds

  • Manually restarting the pod to kill all Chromium processes
  • Instructing users to tell the AI to close browser tabs (unreliable)
  • Running background cleanup scripts to periodically kill excess renderer processes

Metadata

Metadata

Assignees

No one assigned

    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