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

How I Prompt AI Models in 2026 vs a Year Ago: 3 Key Changes
A developer shares three concrete changes: switch from prompt templates to reusable skills, write goals instead of step-by-step instructions, and use /loop commands for long-running projects in Claude Code and Codex.

Building with Codex, Executing with OpenClaw: A Practical Split That Works
A developer shares how they broke through OpenClaw frustration by building automation logic with Codex and using OpenClaw purely as the execution layer — plus how Apple Messages via CarPlay made it feel closer to a Jarvis-like assistant.

OpenClaw Agents Become Unresponsive After Week 1: Telegram Integration Issues?
User reports OpenClaw agents going silent after the first week, suspecting Telegram integration or long-term runtime issues. Restarts help temporarily.

Managing Claude Code Context Window for Cost and Performance
A developer explains how every API call sends the full conversation history, making accumulated history the expensive part, and shares a workflow of starting fresh sessions with handoff notes to reduce costs and improve response quality.