openclaw - 💡(How to fix) Fix [Bug]: dist/index.js subcommands in official Docker image take 24s-49s to start [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#72952Fetched 2026-04-28 06:29:36
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0

node dist/index.js subcommands are extremely slow in the official Docker image even when run directly inside the running openclaw-gateway container.

This does not look like an Ansible issue. The timings below were measured directly on the machine with docker compose exec.

The same container executes a trivial node -e command in about 0.3s, but dist/index.js commands take roughly 24s to 49s depending on subcommand.

Root Cause

  • docker compose exec is not the bottleneck (node -e is fast)
  • the Matrix homeserver does not appear to be the primary bottleneck either, because node dist/index.js --help already takes about 42s
  • Matrix-specific work adds some additional time, but only after an already very large startup or init delay

Code Example

time sudo docker compose --project-name control --file /srv/compose/control/compose.yaml exec -T openclaw-gateway node -e 'console.log("ok")'

time sudo docker compose --project-name control --file /srv/compose/control/compose.yaml exec -T openclaw-gateway node dist/index.js --help

time sudo docker compose --project-name control --file /srv/compose/control/compose.yaml exec -T openclaw-gateway node dist/index.js channels status --json

time sudo docker compose --project-name control --file /srv/compose/control/compose.yaml exec -T openclaw-gateway node dist/index.js channels status --probe --json

time sudo docker compose --project-name control --file /srv/compose/control/compose.yaml exec -T openclaw-gateway node dist/index.js matrix --help

time sudo docker compose --project-name control --file /srv/compose/control/compose.yaml exec -T openclaw-gateway node dist/index.js matrix verify status

time sudo docker compose --project-name control --file /srv/compose/control/compose.yaml exec -T openclaw-gateway node dist/index.js matrix verify status --json
RAW_BUFFERClick to expand / collapse

Summary

node dist/index.js subcommands are extremely slow in the official Docker image even when run directly inside the running openclaw-gateway container.

This does not look like an Ansible issue. The timings below were measured directly on the machine with docker compose exec.

The same container executes a trivial node -e command in about 0.3s, but dist/index.js commands take roughly 24s to 49s depending on subcommand.

Environment

  • OpenClaw image: ghcr.io/openclaw/openclaw:2026.4.2
  • Deployment: Docker Compose on Debian host
  • Host hardware: Dell Wyse 5070 thin client
  • CPU: Intel Celeron J4105
  • RAM: 8 GB
  • OS: Debian 13 (Trixie)
  • Docker Engine: 29.3.1
  • Docker storage driver: overlayfs
  • Current OpenClaw shape: Matrix enabled, no local model provider configured

Steps to reproduce

Run directly on the host against the running container:

time sudo docker compose --project-name control --file /srv/compose/control/compose.yaml exec -T openclaw-gateway node -e 'console.log("ok")'

time sudo docker compose --project-name control --file /srv/compose/control/compose.yaml exec -T openclaw-gateway node dist/index.js --help

time sudo docker compose --project-name control --file /srv/compose/control/compose.yaml exec -T openclaw-gateway node dist/index.js channels status --json

time sudo docker compose --project-name control --file /srv/compose/control/compose.yaml exec -T openclaw-gateway node dist/index.js channels status --probe --json

time sudo docker compose --project-name control --file /srv/compose/control/compose.yaml exec -T openclaw-gateway node dist/index.js matrix --help

time sudo docker compose --project-name control --file /srv/compose/control/compose.yaml exec -T openclaw-gateway node dist/index.js matrix verify status

time sudo docker compose --project-name control --file /srv/compose/control/compose.yaml exec -T openclaw-gateway node dist/index.js matrix verify status --json

Measured timings

  • node -e 'console.log("ok")'
    • real 0m0.288s
  • node dist/index.js --help
    • real 0m41.923s
  • node dist/index.js channels status --json
    • real 0m42.931s
  • node dist/index.js channels status --probe --json
    • real 0m42.856s
  • node dist/index.js matrix --help
    • real 0m43.671s
  • node dist/index.js matrix verify status
    • real 0m48.759s
  • node dist/index.js matrix verify status --json
    • real 0m48.840s

Expected behavior

dist/index.js commands should not have tens of seconds of startup or init latency inside the official Docker image.

Actual behavior

There appears to be a large command-startup or command-init cost in dist/index.js itself:

  • docker compose exec is not the bottleneck (node -e is fast)
  • the Matrix homeserver does not appear to be the primary bottleneck either, because node dist/index.js --help already takes about 42s
  • Matrix-specific work adds some additional time, but only after an already very large startup or init delay

Additional notes

  • channels status --json and channels status --probe --json are essentially the same duration here, which also suggests the dominant cost happens before the deeper probe work
  • matrix verify status and matrix verify status --json are also essentially the same duration here
  • This may be related to the node dist/index.js path specifically, but it does not look like the existing plugin-CLI-registration issue because the built-in commands do work here; they are just very slow

extent analysis

TL;DR

Investigate the dist/index.js file for potential bottlenecks or initialization issues that could be causing the significant delay in command execution.

Guidance

  • Verify that the issue is not related to the Docker environment by running the dist/index.js commands directly on the host machine outside of the Docker container.
  • Check the dist/index.js file for any expensive operations or imports that could be causing the delay, such as complex computations, network requests, or large file reads.
  • Consider adding logging or debugging statements to the dist/index.js file to identify where the delay is occurring and what operations are being performed during that time.
  • Compare the performance of the dist/index.js commands with other Node.js applications or scripts running in the same environment to determine if the issue is specific to this application.

Example

No specific code example is provided as the issue is related to the performance of the dist/index.js file, which is not included in the provided information.

Notes

The issue may be related to the specific implementation of the dist/index.js file or the dependencies it uses, and further investigation is needed to identify the root cause of the delay.

Recommendation

Apply a workaround by optimizing the dist/index.js file or its dependencies to reduce the initialization time, as the exact cause of the issue is not immediately clear and may require further debugging and analysis.

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…

FAQ

Expected behavior

dist/index.js commands should not have tens of seconds of startup or init latency inside the official Docker image.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: dist/index.js subcommands in official Docker image take 24s-49s to start [1 participants]