4

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"

1 Answer 1

3

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 :-/

Sign up to request clarification or add additional context in comments.

4 Comments

So the only option here is to go back to Heroku right?
I believe it should be possible to implement via distributed locking (redis.io/topics/distlock) but it's your call about whether it's worth the effort.
I just ignore the error, and It goes away after 10 seconds. Though it is not an optimized solution, I want to keep all of my apps in 1 place.
I'd argue that ignoring a problem is not a solution...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.