openclaw - 💡(How to fix) Fix Telegram cold start slow when IPv6 route to api.telegram.org is broken [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#73604Fetched 2026-04-29 06:17:35
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Author
Timeline (top)
closed ×1commented ×1

After a gateway restart on macOS, the Telegram providers took several minutes to become responsive because initial Telegram API calls attempted an unreachable IPv6 path before OpenClaw fell back to the sticky IPv4-only dispatcher.

The IPv4 fallback works, but cold start is slow/noisy when the host has a broken IPv6 route. It would be helpful if the Telegram provider could fail over faster, prefer IPv4 earlier for Telegram API calls after IPv6 failures, or remember/apply the sticky IPv4 fallback before repeated startup calls such as deleteWebhook.

Root Cause

After a gateway restart on macOS, the Telegram providers took several minutes to become responsive because initial Telegram API calls attempted an unreachable IPv6 path before OpenClaw fell back to the sticky IPv4-only dispatcher.

Fix Action

Fix / Workaround

After a gateway restart on macOS, the Telegram providers took several minutes to become responsive because initial Telegram API calls attempted an unreachable IPv6 path before OpenClaw fell back to the sticky IPv4-only dispatcher.

2026-04-28T10:04:10.578-04:00 [telegram] fetch fallback: enabling sticky IPv4-only dispatcher (codes=ETIMEDOUT,EHOSTUNREACH)
2026-04-28T10:04:40.901-04:00 [telegram] deleteWebhook failed: Network request for 'deleteWebhook' failed!
2026-04-28T10:04:40.902-04:00 [telegram] webhook cleanup failed: Network request for 'deleteWebhook' failed!; retrying in 2.24s.
2026-04-28T10:05:15.082-04:00 [telegram] deleteWebhook failed: Network request for 'deleteWebhook' failed!
2026-04-28T10:05:15.083-04:00 [telegram] webhook cleanup failed: Network request for 'deleteWebhook' failed!; retrying in 4.14s.
2026-04-28T10:10:33.539-04:00 [telegram] fetch fallback: DNS-resolved IP unreachable; trying alternative Telegram API IP (codes=ETIMEDOUT)

Code Example

2026-04-28T10:04:04.356-04:00 [telegram] [default] starting provider
2026-04-28T10:04:04.357-04:00 [telegram] [fletcher] starting provider
2026-04-28T10:04:04.357-04:00 [telegram] [harbor] starting provider
2026-04-28T10:04:04.357-04:00 [telegram] [honey] starting provider
2026-04-28T10:04:04.362-04:00 [gateway] ready

---

2026-04-28T10:04:10.578-04:00 [telegram] fetch fallback: enabling sticky IPv4-only dispatcher (codes=ETIMEDOUT,EHOSTUNREACH)
2026-04-28T10:04:40.901-04:00 [telegram] deleteWebhook failed: Network request for 'deleteWebhook' failed!
2026-04-28T10:04:40.902-04:00 [telegram] webhook cleanup failed: Network request for 'deleteWebhook' failed!; retrying in 2.24s.
2026-04-28T10:05:15.082-04:00 [telegram] deleteWebhook failed: Network request for 'deleteWebhook' failed!
2026-04-28T10:05:15.083-04:00 [telegram] webhook cleanup failed: Network request for 'deleteWebhook' failed!; retrying in 4.14s.
2026-04-28T10:10:33.539-04:00 [telegram] fetch fallback: DNS-resolved IP unreachable; trying alternative Telegram API IP (codes=ETIMEDOUT)

---

$ dig +short api.telegram.org A
149.154.166.110

$ dig +short api.telegram.org AAAA
2001:67c:4e8:f004::9

$ curl -4 -I --connect-timeout 8 --max-time 12 https://api.telegram.org
HTTP/2 302
server: nginx/1.18.0
location: https://core.telegram.org/bots

$ curl -6 -I --connect-timeout 8 --max-time 12 https://api.telegram.org
curl: (7) Failed to connect to api.telegram.org port 443 after 3 ms: Couldn't connect to server
RAW_BUFFERClick to expand / collapse

Telegram provider cold-start delay when IPv6 route to api.telegram.org is broken

Summary

After a gateway restart on macOS, the Telegram providers took several minutes to become responsive because initial Telegram API calls attempted an unreachable IPv6 path before OpenClaw fell back to the sticky IPv4-only dispatcher.

The IPv4 fallback works, but cold start is slow/noisy when the host has a broken IPv6 route. It would be helpful if the Telegram provider could fail over faster, prefer IPv4 earlier for Telegram API calls after IPv6 failures, or remember/apply the sticky IPv4 fallback before repeated startup calls such as deleteWebhook.

Environment

  • OpenClaw: 2026.4.26 (be8c246)
  • Host: macOS/Darwin arm64
  • Gateway: LaunchAgent
  • Telegram: multiple configured bot accounts/providers starting on gateway boot

Evidence

Gateway came up and Telegram providers started immediately:

2026-04-28T10:04:04.356-04:00 [telegram] [default] starting provider
2026-04-28T10:04:04.357-04:00 [telegram] [fletcher] starting provider
2026-04-28T10:04:04.357-04:00 [telegram] [harbor] starting provider
2026-04-28T10:04:04.357-04:00 [telegram] [honey] starting provider
2026-04-28T10:04:04.362-04:00 [gateway] ready

Then Telegram networking failed and eventually enabled IPv4-only fallback:

2026-04-28T10:04:10.578-04:00 [telegram] fetch fallback: enabling sticky IPv4-only dispatcher (codes=ETIMEDOUT,EHOSTUNREACH)
2026-04-28T10:04:40.901-04:00 [telegram] deleteWebhook failed: Network request for 'deleteWebhook' failed!
2026-04-28T10:04:40.902-04:00 [telegram] webhook cleanup failed: Network request for 'deleteWebhook' failed!; retrying in 2.24s.
2026-04-28T10:05:15.082-04:00 [telegram] deleteWebhook failed: Network request for 'deleteWebhook' failed!
2026-04-28T10:05:15.083-04:00 [telegram] webhook cleanup failed: Network request for 'deleteWebhook' failed!; retrying in 4.14s.
2026-04-28T10:10:33.539-04:00 [telegram] fetch fallback: DNS-resolved IP unreachable; trying alternative Telegram API IP (codes=ETIMEDOUT)

Direct route tests from the same host show IPv4 succeeds and IPv6 fails:

$ dig +short api.telegram.org A
149.154.166.110

$ dig +short api.telegram.org AAAA
2001:67c:4e8:f004::9

$ curl -4 -I --connect-timeout 8 --max-time 12 https://api.telegram.org
HTTP/2 302
server: nginx/1.18.0
location: https://core.telegram.org/bots

$ curl -6 -I --connect-timeout 8 --max-time 12 https://api.telegram.org
curl: (7) Failed to connect to api.telegram.org port 443 after 3 ms: Couldn't connect to server

The machine had IPv6 default routes through utun tunnel interfaces, so this is likely a local/network broken IPv6 route. The user-visible issue is that OpenClaw restart recovery is slow while Telegram startup retries discover this.

Expected behavior

When Telegram API IPv6 is unreachable but IPv4 works, gateway restart should recover Telegram responsiveness quickly, ideally without repeated deleteWebhook failures across all Telegram accounts.

Actual behavior

OpenClaw eventually falls back to IPv4, but startup responsiveness was delayed and logs showed repeated Telegram API failures/retries first.

Possible improvements

  • Use a shorter IPv6/connect timeout for Telegram API startup calls.
  • Prefer IPv4 earlier after the first ETIMEDOUT / EHOSTUNREACH for api.telegram.org.
  • Share the sticky IPv4 fallback state across Telegram accounts/providers during the same gateway process startup.
  • Optionally expose a config/env flag to force Telegram API IPv4 when operators know IPv6 is broken.

extent analysis

TL;DR

Prefer IPv4 for Telegram API calls after the first IPv6 failure to reduce cold-start delay.

Guidance

  • Implement a shorter IPv6/connect timeout for Telegram API startup calls to quickly detect unreachable IPv6 routes.
  • Modify the Telegram provider to prefer IPv4 earlier after encountering ETIMEDOUT or EHOSTUNREACH errors for api.telegram.org.
  • Share the sticky IPv4 fallback state across Telegram accounts/providers during the same gateway process startup to avoid repeated failures.
  • Consider adding a config/env flag to force Telegram API IPv4 when IPv6 is known to be broken.

Example

No code snippet is provided as the issue does not specify the programming language or framework used.

Notes

The solution assumes that the IPv6 route issue is local to the host or network and that IPv4 is a viable fallback. Additional debugging may be necessary if the issue persists after implementing these changes.

Recommendation

Apply workaround: Prefer IPv4 for Telegram API calls after the first IPv6 failure to reduce cold-start delay, as this approach is likely to yield the quickest improvement in responsiveness without requiring significant changes to the underlying infrastructure.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

When Telegram API IPv6 is unreachable but IPv4 works, gateway restart should recover Telegram responsiveness quickly, ideally without repeated deleteWebhook failures across all Telegram accounts.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Telegram cold start slow when IPv6 route to api.telegram.org is broken [1 comments, 2 participants]