openclaw - 💡(How to fix) Fix Discord gateway startup takes 1–2 minutes after 4.1 → 4.20 upgrade (follow-up to #69841) [2 comments, 2 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#70057Fetched 2026-04-23 07:29:51
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
1
Timeline (top)
commented ×2mentioned ×2subscribed ×2

Following the closure of #69841 (umbrella issue), this is a focused report on the remaining Discord gateway startup delay. After upgrading from 4.1 to 4.20, the OpenClaw gateway takes an unusually long time to start, and even after the gateway process is running, Discord connection takes an additional 1–2 minutes before the bot becomes responsive in channels.

This issue persists after bundled plugin runtime dependencies are confirmed staged (see #69923 for the deps-staging class).


Root Cause

Please advise on how to capture more detailed startup profiling data. The OPENCLAW_PLUGIN_LOAD_PROFILE=1 env var does not seem to produce visible output in our environment—possibly because the process hangs before reaching the profiling phase.

Fix Action

Fix / Workaround

  1. Start from a working 4.1 install on Ubuntu EC2
  2. Upgrade to 4.20 (openclaw update or manual install)
  3. Run openclaw gateway start
  4. Observe startup duration vs. 4.1 baseline
  5. In Discord, try @bot mention or /status immediately after gateway reports running
  6. Observe 1–2 minute delay before bot responds
RAW_BUFFERClick to expand / collapse

Slow Discord Gateway Startup After 4.1 → 4.20 Upgrade

Summary

Following the closure of #69841 (umbrella issue), this is a focused report on the remaining Discord gateway startup delay. After upgrading from 4.1 to 4.20, the OpenClaw gateway takes an unusually long time to start, and even after the gateway process is running, Discord connection takes an additional 1–2 minutes before the bot becomes responsive in channels.

This issue persists after bundled plugin runtime dependencies are confirmed staged (see #69923 for the deps-staging class).


Environment

FieldValue
OSUbuntu (AWS EC2)
OpenClaw version4.20 (115f05d5952adeaa8043311c24c4b8a3803481ba)
Node versionv25.4.0
Install typeGlobal / packaged ([email protected])
Previous version4.1

Problem Description

1. Slow Gateway Startup

Running openclaw gateway start (or restart) takes significantly longer than on 4.1. The terminal shows no output for a noticeable period, then plugin-loading messages appear slowly.

2. Discord Connection Delay

Even after the gateway process reports as running:

  • The Discord bot does not immediately appear online
  • 1–2 minutes elapse before it responds to messages or slash commands
  • During this window, @Bütyök mentions or /status slash commands time out or receive no response

3. doctor --non-interactive Hangs

Running OPENCLAW_PLUGIN_LOAD_PROFILE=1 openclaw doctor --non-interactive appears to hang indefinitely (tested 2026-04-22, killed after 60s+). This suggests the plugin/runtime staging check itself is a bottleneck.


Steps to Reproduce

  1. Start from a working 4.1 install on Ubuntu EC2
  2. Upgrade to 4.20 (openclaw update or manual install)
  3. Run openclaw gateway start
  4. Observe startup duration vs. 4.1 baseline
  5. In Discord, try @bot mention or /status immediately after gateway reports running
  6. Observe 1–2 minute delay before bot responds

Expected Behavior

  • Gateway startup should complete within seconds (as it did on 4.1)
  • Discord bot should be responsive immediately after gateway reports ready
  • doctor should complete quickly even with OPENCLAW_PLUGIN_LOAD_PROFILE=1

Related Issues

  • #69841 – Original umbrella issue (partially fixed, closed as split)
  • #69869 – Fixed the Discord /status ephemeral follow-up leak
  • #69923 – Bundled runtime dependency staging (acknowledged by maintainer as the right home for startup repair work)

Notes

  • Bundled plugin runtime deps are installed globally and accessible (confirmed via npm list -g in #69841)
  • The delay appears to be after deps are staged, not during install
  • No high CPU or memory pressure observed during startup (t1.small EC2, typical load)
  • openclaw doctor without --non-interactive also reports missing bundled deps falsely

Request

Please advise on how to capture more detailed startup profiling data. The OPENCLAW_PLUGIN_LOAD_PROFILE=1 env var does not seem to produce visible output in our environment—possibly because the process hangs before reaching the profiling phase.

/cc @steipete

extent analysis

TL;DR

The slow Discord gateway startup after upgrading from 4.1 to 4.20 can be mitigated by investigating the plugin loading process and optimizing the doctor command.

Guidance

  1. Investigate plugin loading: Since the terminal shows no output for a noticeable period before plugin-loading messages appear, it's likely that the plugin loading process is causing the delay. Check the plugin configuration and dependencies to ensure they are compatible with the new version.
  2. Optimize the doctor command: The doctor command hanging indefinitely suggests that it's a bottleneck. Try running openclaw doctor without the --non-interactive flag to see if it produces any output or errors.
  3. Verify plugin dependencies: Although bundled plugin runtime dependencies are confirmed staged, double-check that they are correctly installed and accessible. Run npm list -g to verify the dependencies.
  4. Capture startup profiling data: To capture more detailed startup profiling data, try setting the OPENCLAW_PLUGIN_LOAD_PROFILE environment variable and running the openclaw gateway start command with the --verbose flag, if available.

Example

No code snippet is provided as the issue does not imply a specific code-related fix.

Notes

The issue may be related to the changes introduced in version 4.20, and the delay appears to be after the dependencies are staged, not during installation. No high CPU or memory pressure is observed during startup.

Recommendation

Apply a workaround by investigating the plugin loading process and optimizing the doctor command, as the root cause of the issue is not immediately clear. This approach allows for a more targeted investigation and potential fix.

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

openclaw - 💡(How to fix) Fix Discord gateway startup takes 1–2 minutes after 4.1 → 4.20 upgrade (follow-up to #69841) [2 comments, 2 participants]