If you have been coding Telegram bots for more than a few days, you have almost certainly encountered this dreaded log message:
telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
Why Does This Error Happen?
Telegram's Bot API enforces a strict architectural rule: only one single process in the entire world may call getUpdates for a given bot token at any given moment.
This error occurs when:
- Your bot is running simultaneously on both your local PC and your cloud server.
- A previous bot process was not cleanly stopped and is still lingering in the background (zombie process).
- A webhook was previously configured on the bot and was not deleted before switching to polling.
Solution 1: Terminate Duplicate Local Processes
If you are on Windows, check Task Manager for lingering python.exe processes. On Linux/macOS, run:
pkill -f "python.*bot.py"
Solution 2: Delete Hanging Webhooks
If your bot previously used webhooks, Telegram will continuously reject your getUpdates polling calls. Open your web browser and visit this URL (replace with your real token):
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/deleteWebhook?drop_pending_updates=true
You should receive a JSON response: {"ok":true,"result":true,"description":"Webhook was deleted"}.
Solution 3: Deploy on BotifyHost with Single-Instance Enforcement
BotifyHost's process supervisor automatically enforces strict single-instance isolation. When you deploy an update, the supervisor gracefully shuts down the prior container before starting the new one, completely preventing 409 Conflict errors.
Host Your Telegram Bot 24/7 on BotifyHost
Say goodbye to laptops running overnight and sleeping web dynos. Deploy your bot in 30 seconds with 99.99% uptime, built-in code editor, and live logs.