Having 2 instances after deploy

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 fix this issue?

Hi there, we wouldn’t create 2 instances but there can be a point in time where there are 2 instances running whilst the new one replaces the old one (see https://render.com/docs/deploys#zero-downtime-deploys)

John B

1 Like

is there any way to ensure that only one instance is created because now there are two bot running on the same access token and they clash with each other.

I am a student learning about cloud computing and I am doing my project.
I don’t know what is the difference between Heroku and Render. But I don’t have this issue when I run my code on Heroku. However, we are required to use platform other than Heroku so I moved to Render. I have tried many platform but Render is the best so far, but I cannot fix the two instances problem.

Heroku don’t provide the feature that does this as a default like we do - they call it preboot, you have to explicitly enable it on them.

We don’t provide the ability to disable it either. However, if you were to attach a small disk to the service that would prevent 2 instances from running due to a technical limitation - however, disks aren’t available on our free plan services which may further limit your options here.

John B

Do you use “Web Service” or “Background Worker” to deploy your Telegram bot?

I tried attaching a 1GB disk to my Telegram bot app (background worker), but the error did not go away. Any other solution?

Hi Miyato - what errors are you getting? It might be worth opening a new support issue here by emailing support@render.com

John B

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