High CPU/RAM and Gateway Restarts in OpenClaw? Disable IPv6 for Telegram

If your OpenClaw instance has been experiencing high CPU/RAM usage, sluggish responses, and periodic gateway restarts in recent versions (especially with Telegram integration), the culprit may be autoSelectFamily: true (default on Node 22+). A user on r/openclaw traced the issue to failed IPv6 connections causing resource leaks.
The Problem
OpenClaw's Telegram integration on Node 22+ defaults to autoSelectFamily: true, which attempts both IPv4 and IPv6 connections simultaneously. If your network stack isn't IPv6-capable, those connections fail with ENETUNREACH, cascading into event loop stalls. Symptoms include:
- 80-second event loop freezes
- CPU pinned at ~52%
- ~9 gateway restarts per day
sendChatActionfailures
The Fix
Set both autoSelectFamily: false (forces IPv4-only connections) and dnsResultOrder: 'ipv4first' as a belt-and-suspenders approach in your Telegram bot configuration. Example config snippet:
// In your OpenClaw Telegram bot setup
clientOptions: {
autoSelectFamily: false,
dnsResultOrder: 'ipv4first'
}
Results
After applying the fix, the user reported:
- 0 liveness warnings
- 0 ERROR-level log entries
- 0 restarts over 5+ hours
- 0
sendChatActionfailures - CPU dropped from 52% to 4.4%
- No event loop freezes
If you run multiple Telegram bots, the issue may be more pronounced. This fix is applicable to any OpenClaw version using Node 22+ with Telegram.
📖 Read the full source: r/openclaw
👀 See Also

11 Deep Claude Tips from an 18-Month Daily User
A senior developer shares 11 non-obvious Claude tips after 18 months of daily use, including Projects, Custom Styles, Memory, Sonnet 4.6 vs Opus 4.7, Haiku 4.5 for batch work, Claude Code subagents, and Artifacts calling the API.

Stop Burning Claude Code Tokens on Chat Questions
A developer on r/ClaudeAI saved their weekly token cap by routing simple chat questions to cheap models like Haiku, reserving Claude Code for agent tasks like multi-file edits.

OpenClaw LLM Timeout Fix for Cold Model Loading
A Reddit user identified and fixed a specific timeout issue in OpenClaw where cold-loaded local LLMs would fail after about 60 seconds, even with higher general timeouts set. The solution involves adjusting the embedded-runner LLM idle timeout configuration.

Helpful Tips from the OpenClaw Community: A Deep Dive into AI Agent Optimization
Discover valuable tips from the OpenClaw community on optimizing AI coding agents for better performance and efficiency. These insights could revolutionize your AI projects.