I am trying to deploy my telegram bot here. However, the deployment would always fail because two instances are created during a single deployment and they clash with each other. The bot runs find when I deploy it on my own Desktop. Do anyone know how to

Hello, I have deployed a pytelegrambotapi bot here in render after the heroku stopped the free tier, However, I am seeing that my bot often stops as there are 2 instances running but I am pretty sure that I have been running only one. I searched the community and found out that render uses preboot and zero down time promise which I think may cause the error. Is there a way to disable this and fix my issue? Thanks

Hey there Silotb,

It looks like you might be attempting to run a bot on Render, there are a bunch of things that you probably need to know.

Bots are best deployed to us using a Background service - these run persistently in the background and don’t expose any web server however, these service types aren’t available on the free plan.

If you try and run a bot via a web service the deployment will probably fail, typically about 10 minutes after you’ve deployed it and sometimes there are scenarios where 2 may be running for a period of time, this is down to our preboot feature and not something that can be disabled.

We’ve been alerted to issues running Discord bots on us being rate limited by Discord, this is down to how traffic leaves our services - this may result in you receiving a 429 from Discord or having your requests rate limited - we’ve reached out to Discord but we don’t have a solution here yet.

If this doesn’t answer your question just let us know and we’ll try and help where we can,


John B

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.