Hi everyone,
I wanted to share a solution for Telegram API timeouts that started affecting my workflows in late July.
Problem Description:
-
Started experiencing consistent timeouts when calling Telegram APIs (both via Telegram node and HTTP Request node)
-
Error:
The connection timed out, consider setting the 'Retry on Fail' option in the node settings -
Direct curl commands from terminal worked perfectly fine
-
Issue occurred on OVH Kimsufi server
What I tried (that didn’t work):
-
Changing Telegram API keys - same timeout issues (topic: Access bot token for telegram trigger to coonnect )
-
Updating to [email protected] as suggested in topic: Performance problems with the 1.105.x and 1.106.0 releases - #29 by umnz - no improvement
-
Using HTTP Request POST node instead of Telegram node - same timeout errors
Solution: Set the Node.js DNS resolution to prefer IPv4:
export NODE_OPTIONS="--dns-result-order=ipv4first"
After applying this setting, all Telegram API calls work instantly without any timeout issues. I think the issue was related to Node.js DNS resolution order. Probably, on some hosting providers like OVH, IPv6 resolution can be slow or problematic, causing timeouts in Node.js applications even when IPv4 connectivity works perfectly.