#Discord channel disconnects due to event loop blocking during message processing (Windows)

1 messages · Page 1 of 1 (latest)

lofty dragon
#

Hi, I'm having an issue where the Discord bot connects successfully but
disconnects shortly after receiving a message due to event loop blocking.

Setup:

  • OS: Windows 11
  • OpenClaw: 2026.4.29
  • Node.js: v22.22.2
  • Model: google/gemini-3.1-flash-lite-preview
  • Channel: Discord

Symptoms:

  • Gateway starts and Discord logs in successfully
  • Bot receives messages and starts processing
  • Event loop blocks at 100% utilization for 50-100+ seconds
  • Discord disconnects with "Gateway heartbeat ACK timeout" or "Opening handshake has timed out"
  • Bot eventually responds but only after Discord has already disconnected and reconnected
  • fetch-timeout errors appear consistently during Discord provider startup

Relevant log entries:
17:49:20 [discord] discord gateway error: Error: Gateway heartbeat ACK timeout
17:50:18 [fetch-timeout] fetch timeout reached; aborting operation
17:50:18 [diagnostic] liveness warning: reasons=event_loop_delay,event_loop_utilization interval=57s eventLoopDelayP99Ms=54123.3 eventLoopDelayMaxMs=54123.3 eventLoopUtilization=1 cpuCoreRatio=0.06 active=0 waiting=0 queued=0
17:50:18 [discord] discord gateway error: Error: Opening handshake has timed out
17:50:18 [discord] gateway: Gateway websocket closed: 1006
17:51:42 [fetch-timeout] fetch timeout reached; aborting operation
17:51:42 [discord] discord gateway error: Error: Opening handshake has timed out
17:51:42 [discord] gateway: Gateway websocket closed: 1006

Things I've tried:

  • Disabled Bonjour, browser, acpx plugins
  • Cleared sessions
  • Tried multiple models (gemini-3.1-flash-lite, gemini-2.5-flash, gemma-4-31b)
  • Added node.exe exclusions to Malwarebytes and Windows Defender
  • Reinstalled OpenClaw and downgraded Node.js to v22
  • No proxy configured
lofty dragon
#

aa

rapid sand
#

Its a Bug, same Here...