Skip to content

bug: DiscordMessageListener SIGUSR1 storm on long LLM responses — 30s EventQueue timeout not configurable #28566

Description

@WindNinja

Summary

Every LLM response exceeding 30 seconds triggers a DiscordMessageListener timed out after 30000ms warning and fires SIGUSR1. On slower providers or large context windows this produces hundreds of unnecessary SIGUSR1 events per day, causing repeated gateway disruption while the gateway is otherwise healthy.

Steps to reproduce

Steps to reproduce:
Use a slow LLM provider or large context window (response time >30s)
Send any message via Discord
Observe [EventQueue] Listener DiscordMessageListener timed out after 30000ms for event MESSAGE_CREATE in gateway.err.log
SIGUSR1 is fired → gateway queue flushed → Discord WS reconnect triggered

Expected behavior

Long async LLM calls should queue normally. A slow listener warning is acceptable. SIGUSR1 / gateway disruption should only fire on a genuine stall, not on normal processing latency.

Actual behavior

417 SIGUSR1 events in a single day on a healthy gateway. Every response >30s is treated as a stall.

OpenClaw version

OpenClaw 2026.2.25

Operating system

Provider: Anthropic (claude-sonnet-4-6)

Install method

Platform: macOS 25.3.0 arm64

Logs, screenshots, and evidence

Root cause:
DISCORD_SLOW_LISTENER_THRESHOLD_MS = 3e4 is hardcoded in compiled dist. There is no config option to raise this threshold. Patching the dist file is not viable — overwritten on every update.

Proposed fix:
Expose as gateway.discord.slowListenerThresholdMs in openclaw.json. The constant is already cleanly isolated — this is a one-line config wire-up.

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions