openclaw - 💡(How to fix) Fix [Bug] v2026.4.8 — Bonjour/mDNS service-advertise sidecar pegs 99% CPU in headless Docker, eventually triggers container exit [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#63248Fetched 2026-04-09 07:56:21
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

Running ghcr.io/openclaw/openclaw:2026.4.8 in a standard Docker container (default bridge network, no --network=host) results in a child openclaw process consuming 99% CPU continuously, attributable to the bonjour/mDNS service-advertise watchdog being unable to successfully announce on the network. After 9–18 minutes the container exits.

OPENCLAW_DISABLE_BONJOUR=1 (discovered by string-grepping /app/dist/) is an effective workaround.

Root Cause

This is the root cause of the "container exits after 9–18 min" mystery I was hitting while testing v4.8 in disposable containers. It also makes v4.8 unsuitable for CI/test pipelines that run the gateway in standard Docker without host networking.

Fix Action

Workaround

Set OPENCLAW_DISABLE_BONJOUR=1 in the container environment:

docker run -d \
  -e OPENCLAW_DISABLE_BONJOUR=1 \
  -p 28789:18789 \
  -v <state>:/home/node/.openclaw \
  ghcr.io/openclaw/openclaw:2026.4.8

Confirmed: with this set, the runaway 99% CPU process disappears and the bonjour log spam stops. The env var is referenced inside /app/dist/ but is not documented anywhere I could find.

Code Example

PID  PPID  C    CMD
1    0     0    openclaw
15   1     19   openclaw-gateway
104  1     99   openclaw                 ← 99% CPU runaway, no subcommand suffix

---

[bonjour] watchdog detected non-announced service; attempting re-advertise
(gateway fqdn=<container-id> (OpenClaw)._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=probing)
[bonjour] restarting advertiser (service stuck in announcing for 12103ms ...)

---

docker run -d \
  -e OPENCLAW_DISABLE_BONJOUR=1 \
  -p 28789:18789 \
  -v <state>:/home/node/.openclaw \
  ghcr.io/openclaw/openclaw:2026.4.8
RAW_BUFFERClick to expand / collapse

Title

[Bug] v2026.4.8 — Bonjour/mDNS service-advertise sidecar pegs 99% CPU in headless Docker (no --network=host), eventually triggers container exit

Body

Summary

Running ghcr.io/openclaw/openclaw:2026.4.8 in a standard Docker container (default bridge network, no --network=host) results in a child openclaw process consuming 99% CPU continuously, attributable to the bonjour/mDNS service-advertise watchdog being unable to successfully announce on the network. After 9–18 minutes the container exits.

OPENCLAW_DISABLE_BONJOUR=1 (discovered by string-grepping /app/dist/) is an effective workaround.

Environment

  • Image: ghcr.io/openclaw/openclaw:2026.4.8 (digest sha256:cfd0d7fbd222bf570f9b19293b70d161b046da05a25651c2bef6146935fb9209)
  • Host: Linux VPS (Contabo), Docker default bridge network
  • Run command: docker run -d --name openclaw-test -p 28789:18789 -v <state>:/home/node/.openclaw ghcr.io/openclaw/openclaw:2026.4.8
  • All channels disabled in mounted openclaw.json (whatsapp, telegram, discord)

Reproduction steps

  1. Pull ghcr.io/openclaw/openclaw:2026.4.8
  2. Boot a container (default bridge network, port-publish 28789:18789, no --network=host)
  3. Wait 60s — gateway becomes ready
  4. docker top <container> — observe a child openclaw process at constant 99% CPU
  5. docker logs <container> — observe repeated bonjour watchdog re-advertise loop
  6. After ~9–18 minutes, container exits silently

Symptoms

Process tree (docker top)

PID  PPID  C    CMD
1    0     0    openclaw
15   1     19   openclaw-gateway
104  1     99   openclaw                 ← 99% CPU runaway, no subcommand suffix

Log signature

[bonjour] watchdog detected non-announced service; attempting re-advertise
(gateway fqdn=<container-id> (OpenClaw)._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=probing)
[bonjour] restarting advertiser (service stuck in announcing for 12103ms ...)

These messages repeat indefinitely.

Side effect: CLI subprocess starvation

With bonjour pegging one CPU core, subsequent docker exec invocations of openclaw cron list / openclaw message --help / openclaw channels list enter their own busy-wait loops and never produce output (likely separate issue, see companion report).

Workaround

Set OPENCLAW_DISABLE_BONJOUR=1 in the container environment:

docker run -d \
  -e OPENCLAW_DISABLE_BONJOUR=1 \
  -p 28789:18789 \
  -v <state>:/home/node/.openclaw \
  ghcr.io/openclaw/openclaw:2026.4.8

Confirmed: with this set, the runaway 99% CPU process disappears and the bonjour log spam stops. The env var is referenced inside /app/dist/ but is not documented anywhere I could find.

Suggested fixes

  1. Document OPENCLAW_DISABLE_BONJOUR=1 in the gateway environment variables reference
  2. Auto-disable bonjour when running headless in a container — detect via cgroup//proc/1/cgroup or fall back to disabling after N consecutive failed announce attempts instead of looping forever
  3. Bound the bonjour retry loop with exponential backoff so even when it fails it doesn't peg CPU
  4. Default to bonjour: false in containerized images — service discovery via mDNS isn't useful when the container's network namespace is isolated

Impact

This is the root cause of the "container exits after 9–18 min" mystery I was hitting while testing v4.8 in disposable containers. It also makes v4.8 unsuitable for CI/test pipelines that run the gateway in standard Docker without host networking.

extent analysis

TL;DR

Set the environment variable OPENCLAW_DISABLE_BONJOUR=1 when running the openclaw container to prevent the bonjour/mDNS service-advertise watchdog from consuming 99% CPU.

Guidance

  • To fix the issue, set OPENCLAW_DISABLE_BONJOUR=1 in the container environment using the -e flag when running the container with Docker.
  • Verify that the bonjour log spam stops and the runaway 99% CPU process disappears after setting the environment variable.
  • Consider implementing one of the suggested fixes, such as auto-disabling bonjour when running headless in a container or bounding the bonjour retry loop with exponential backoff.
  • Check the container's logs and process tree to ensure that the issue is resolved and the container is running normally.

Example

docker run -d \
  -e OPENCLAW_DISABLE_BONJOUR=1 \
  -p 28789:18789 \
  -v <state>:/home/node/.openclaw \
  ghcr.io/openclaw/openclaw:2026.4.8

Notes

The OPENCLAW_DISABLE_BONJOUR=1 environment variable is not documented, but it is referenced in the /app/dist/ directory and can be used to disable the bonjour service-advertise watchdog.

Recommendation

Apply the workaround by setting OPENCLAW_DISABLE_BONJOUR=1 in the container environment, as it is a simple and effective solution to prevent the bonjour/mDNS service-advertise watchdog from consuming 99% CPU.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING