Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Telegram bot logs Error code 409 even though there is single instance running

I have deployed my Telegram bot on Heroku written in Python (PyTelegramBotAPI) before and it was working without any issue. Today I tried to migrate it to Render.com. I stopped my Dyno and deployed it on Render and it logs below error. I tried deleting the Dyno completely and render still logs the same error. Finally I tried revoking the bot key but the issue is still the same. I'm certain I don't run any extra instance of the bot. The weird part is the bot still responds for a little time after all the instances are stopped or deleted. Finally I deployed it again on Heroku and it's working just fine. How can I fix that?

Botcode

Error:

(__init__.py:688 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"
like image 496
Pasindu Ruwandeniya Avatar asked Oct 16 '25 10:10

Pasindu Ruwandeniya


1 Answers

Running into the same issue here. Looks like an incarnation of Heroku's "preboot" feature, more details here: https://community.render.com/t/having-2-instances-after-deploy/3640.

TL;DR: It's impossible to disable it on render.com :-/

like image 160
Alexander Pavlov Avatar answered Oct 19 '25 00:10

Alexander Pavlov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!