#14259: fix(discord): add timeout to restart to prevent duplicate responses
docs
stale
Cluster:
Gateway and System Fixes
Restarts by openclaw were too quick to restart, resulting in more than one bot per channel, and duplicate responses.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
Adds a systemd service example file (`docs/install/systemd.service.example`) to prevent duplicate Discord bot responses caused by overly fast gateway restarts. The key fix is `RestartSec=10`, which introduces a 10-second delay between restart attempts, giving the previous bot instance time to fully disconnect before a new one starts.
- Adds new systemd unit file at `docs/install/systemd.service.example` with `RestartSec=10` to throttle restarts
- Configures the gateway to run as a dedicated `openclaw` user under `/var/lib/openclaw`
- Note: existing docs reference `systemd --user` services, while this example uses a system-level unit — both are valid deployment models but this difference is worth documenting
<h3>Confidence Score: 4/5</h3>
- This PR is safe to merge — it only adds a documentation example file with no code changes.
- The change is a single new example file in the docs directory with no runtime code impact. The systemd configuration follows standard conventions and the `RestartSec=10` value is reasonable for preventing duplicate bot instances. Minor note: the system-level service pattern differs from the existing user-level systemd references in the docs, but both are valid approaches.
- No files require special attention.
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#9036: fix: add systemd restart limits to prevent infinite crash-loops
by joetomasone · 2026-02-04
78.9%
#13652: fix(discord): ensure default bot loads when multiple accounts are con…
by metav · 2026-02-10
78.4%
#16016: fix: update systemd unit version on gateway restart
by jbold · 2026-02-14
77.2%
#5561: fix(telegram): auto-restart on timeout + lower API timeout to 60s
by jesseproudman · 2026-01-31
74.8%
#10731: fix(discord): add outer retry loop for gateway reconnect exhaustion
by Milofax · 2026-02-06
74.6%
#13084: fix(daemon): multi-layer defense against zombie gateway processes
by openperf · 2026-02-10
74.3%
#15900: fix(discord): filter bot's own messages early to prevent self-DoS
by Shuai-DaiDai · 2026-02-14
73.7%
#13014: feat(infra): add systemd WatchdogSec integration
by TGambit65 · 2026-02-10
73.7%
#20629: fix: use KillMode=mixed to prevent orphaned child processes
by alexander-morris · 2026-02-19
73.4%
#13430: fix(discord): properly handle bot-sent @everyone mentions
by wassimbensalem · 2026-02-10
72.9%