OpenClaw Discord Provider Drops Every 10–15 Minutes (WebSocket Close 1005): What It Means and How to Stabilize
OpenClaw News Editorial
A troubleshooting report in the OpenClaw tracker describes a frustrating loop: the Discord provider disconnects every 10–15 minutes, OpenClaw’s health-monitor restarts it, it reconnects, and then the cycle repeats.
The logs show the WebSocket closing with code 1005, with no other error preceding the drop.
Source issue: openclaw/openclaw#44227
What the report looks like
From the issue report:
- OpenClaw: 2026.3.11
- Platform: Raspberry Pi 5 (Debian arm64)
- Network: Ethernet (previously Wi‑Fi, same symptom)
- Symptom: provider becomes
disconnectedorstale-socketevery 10–15 minutes - Log: “WebSocket connection closed with code 1005”
- Mitigation tried: increased
gateway.channelHealthCheckMinutesto 10
A log excerpt from the report:
[discord] gateway: WebSocket connection closed with code 1005
[health-monitor] [discord:default] health-monitor: restarting (reason: disconnected)
What WebSocket close code 1005 usually means (in practice)
Close code 1005 is a “no status received” condition. In other words: the connection ended, but the peer did not provide a close status code.
That’s why it feels like a silent drop:
- there may be no explicit application error
- it can be triggered by network middleboxes/timeouts (NAT, firewall, router)
- it can also happen when the TCP connection breaks underneath a WebSocket without a clean close handshake
The key point: 1005 is often a symptom, not a root cause.
Why the health-monitor restart loop makes the situation worse
If the Discord socket drops intermittently, an aggressive health check can turn a recoverable transient disconnect into a constant churn loop:
- the provider disconnects
- health-monitor restarts it
- resume/backoff logic never gets to settle
- you lose continuity (presence, inflight events) more often than necessary
In the report, the first workaround was to increase the interval:
gateway.channelHealthCheckMinutes = 10
That doesn’t “fix” the underlying disconnect, but it can reduce unnecessary restarts.
A pragmatic stabilization checklist
The issue report confirms system resources were healthy (no OOM, no throttling). So the fastest path is to narrow down whether this is:
- a network/transport stability problem
- a Discord gateway session/heartbeat issue
- or a health-monitor configuration mismatch
1) Keep the provider from restarting too aggressively
If you see frequent stale-socket/disconnected transitions, start by relaxing the health check interval (as the reporter did). This reduces restart churn and gives the gateway time to resume.
2) Confirm time sync and long-lived TCP stability
For always-on WebSocket workloads, basic host hygiene matters:
- ensure your device clock is correct (NTP running)
- verify there isn’t an idle timeout in your router/firewall for long-lived connections
- if you’re behind a proxy/VPN, test without it
3) Capture more context around the disconnect
Because 1005 is “no status received,” the most useful next information is what happened around the drop:
- whether there are periodic network hiccups at the same cadence
- whether reconnect attempts succeed immediately or keep failing
- whether the connection is being resumed or re-identified repeatedly
If possible, add more detailed logging (OpenClaw / Discord provider logs) for a short window to capture:
- heartbeats / heartbeat ACK timing
- reconnect and resume events
4) Track upstream updates
This report is tied to:
- OpenClaw 2026.3.11
- the bundled Discord.js version
If you can reproduce it reliably, it’s worth tracking the upstream issue (and any linked PRs) and retesting on the next OpenClaw release.
Who should treat this as an urgent production issue
Escalate this quickly if any of the following is true:
- Discord is one of your primary live support or ops channels, so every disconnect creates missed inbound messages or operator confusion.
- You rely on automatic healing to keep the integration alive, because restart loops can make the incident noisier and harder to diagnose.
- Your deployment runs over unstable networks, VPS links, or proxies, where intermittent transport issues can look like a provider bug at first glance.
If Discord is only a low-priority side channel, you can capture evidence first and triage during a calmer maintenance window.
Common operator questions
When is this more likely to be infrastructure drift than a Discord-specific regression?
If the disconnect cadence lines up with network instability, time-sync drift, proxy changes, or other long-lived connection issues on the host, check the transport layer first. A provider regression is more plausible when nearby services stay stable and only the Discord path regressed after a version change.
What is the lowest-risk first move when the bot keeps healing every 10 to 15 minutes?
Reduce restart aggressiveness, capture one clean cycle of logs around the disconnect, and only then decide whether to restart again. The goal is to stop destroying your own evidence while keeping the blast radius limited.
Fast triage FAQ for Discord 1005 restart loops
If someone searches discord websocket closed with code 1005 openclaw, what answer should this page give first?
The first answer should be: treat 1005 as a transport symptom, not a confirmed Discord provider root cause.
Start by separating three possibilities:
- long-lived connection instability on the host or network path
- Discord gateway heartbeat or resume churn
- health-monitor settings that are too aggressive for the actual connection quality
That sequence usually gets operators to the right investigation lane faster than retrying restarts.
What evidence helps maintainers most when a provider heals every 10 to 15 minutes?
The highest-value evidence is usually:
- one full disconnect cycle with timestamps
- heartbeat and reconnect timing around the drop
- whether the client resumed or fully re-identified
- whether other long-lived connections on the same host were stable during the same window
This evidence is more actionable than a raw statement that the socket closed with 1005.
When should this page push readers toward network-path checks before deeper app debugging?
Push readers there early if the deployment runs behind a proxy, VPS edge, router idle timeout, VPN, or any environment where long-lived TCP sessions often get reset quietly.
In those environments, the most efficient path is often to prove or eliminate transport instability before drilling into provider internals.
On-call quick checklist
If you are handling repeated Discord disconnects right now, use this minimum sequence first:
- increase
gateway.channelHealthCheckMinutesso health-monitor stops amplifying short drops into restart storms - capture one full disconnect cycle and confirm whether it really clusters around the 10 to 15 minute window
- compare against other long-lived connections on the same host to see whether only the Discord path is degrading
- check NTP, proxies, VPNs, router idle timeouts, and other transport-layer conditions before blaming provider logic alone
- if Discord is a primary support or alerting channel, prepare a temporary fallback path before more evidence is lost
If this Discord disconnect loop is only one part of a bigger failure, what should you check next?
A bug page like this should help readers decide whether they are in a narrow Discord transport incident, or whether Discord is only the first visible symptom of a broader OpenClaw runtime problem.
Use this split:
- Only the Discord channel is unstable, while the rest of OpenClaw looks healthy: stay on this page and keep narrowing transport, heartbeat, resume, and health-monitor behavior.
- Agents, providers, tools, or Gateway behavior also look unhealthy outside Discord: jump to the Troubleshooting OpenClaw agents page so you do not misclassify a wider runtime incident as a Discord-only bug.
- You are not even sure the installation or environment is valid yet: use the installation success checklist before you debug channel-specific behavior.
- This machine may still be carrying Moltbot-era paths, names, or remotes while you evaluate the Discord issue: clean that up with the 1-minute migration guide.
That distinction matters because high-intent operators usually want the shortest path to the correct troubleshooting lane, not just another issue summary.
If the socket keeps closing with 1005, what should you rule out before blaming Discord alone?
Before you conclude this is only a Discord provider regression, add one more judgment:
- The machine shows wider agent, provider, or Gateway instability: start from the OpenClaw troubleshooting guide.
- The base environment may still be half-working rather than fully validated: run the installation success checklist.
- Legacy migration residue may still be distorting config or runtime expectations: review the migration guide.
The faster this page can hand readers into the right next step, the more likely Discord incident traffic becomes durable troubleshooting traffic instead of a dead end.
What to verify before calling the incident closed
If the socket stops dropping with 1005, do not stop after one clean reconnect. Confirm four things first:
- The reconnect loop stays stable across several real disconnects, not just a single lucky retry.
- The health monitor is no longer causing a restart storm or hiding a deeper failure.
- Other channels, agents, and session flows are still healthy after the fix.
- The incident note records the trigger, affected version, observed close code, and temporary workaround.
Three-minute judgment after search: stabilize the channel or investigate a wider failure
If you arrived here by searching Discord 1005, websocket closed, or “OpenClaw Discord disconnects,” do not restart the bot first. Spend three minutes deciding the incident scope:
- Only Discord is dropping: stay on this page and capture heartbeat, resume, health-monitor, and network-path evidence.
- Multiple channels or agents are failing too: move to the main troubleshooting page so you do not misclassify a Gateway, session, or provider-wide issue as a Discord-only incident.
- Drops happen in a fixed time window: check proxies, VPS edges, router idle timeouts, and long-lived connection keepalive settings first.
- Discord is the support or alerting entry point: prepare a temporary fallback channel before deeper debugging so inbound messages are not lost during triage.
This keeps high-intent search traffic from looping on Discord provider restarts. Stabilize the business entry point first, then decide whether the next lane is transport, health monitor, or a broader OpenClaw runtime incident.
Exact searches this page should answer next
To capture the next layer of high-intent Discord incident searches, this page should now answer these queries directly:
OpenClaw Discord websocket 1005 every 10 minutesOpenClaw Discord provider reconnect loop health monitorDiscord gateway 1005 reverse proxy idle timeout OpenClawgateway.channelHealthCheckMinutes Discord disconnect stormOpenClaw Discord channel drops but other agents work
These queries all point to the same operator need: decide whether to stabilize the Discord channel, tune health checks, or escalate to a wider OpenClaw runtime incident.
Turn Discord websocket traffic into a reconnect acceptance checklist
If you arrived because the Discord websocket disconnects with code 1005 every 10 to 15 minutes and triggers heal, do not only increase retry counts. Split the disconnect path into four evidence points: whether gateway heartbeats return on time, whether a network proxy interrupts long-lived connections, whether heal creates duplicate sessions, and whether event offsets stay continuous after reconnect.
The minimal acceptance checklist includes gateway logs before and after one disconnect, heartbeat RTT, proxy or platform connection logs, and a session or event id comparison after heal. That routes Discord disconnect traffic toward long-connection stability, reconnect idempotency, and event-continuity intent instead of leaving it at repeated drops.
Related reading
- Troubleshooting OpenClaw Agents
- OpenClaw complete installation guide: self-hosting, checkpoints, and common mistakes
- 1-minute migration guide from Moltbot to OpenClaw
Recovery checklist before restarting the Discord bridge
If you reached this page by searching “Discord websocket code 1005 every 10 minutes” or “OpenClaw Discord bridge disconnects”, do not restart the whole Gateway first. Preserve the failure shape and recover the chat surface in this order:
- record the exact disconnect interval, close code, and whether messages still send after reconnect;
- check whether the bridge process is reconnecting, leaking sessions, or spawning duplicate listeners;
- confirm that the token, intents, and guild permissions did not change during the same window;
- restart only the Discord bridge or plugin path if available before bouncing the entire OpenClaw Gateway;
- after recovery, watch at least two full disconnect intervals before declaring the incident stable.
This turns code-1005 traffic into an operational decision path: prove whether the issue is transport churn, auth drift, duplicated listeners, or a platform-side heartbeat problem before using a broad restart as the fix.
Source
- Issue report: openclaw/openclaw#44227
