Discord Chatbot stops woking after some inactivity time

I have created a discord chatbot designed to integrate with OpenAI’s API to create and manage a conversational assistant.
I have a replit core membership, a reserved VM (0.5 vCPU / 2 GiB RAM) and my repl has been deployed. I also set up UptimeRobot to ping the repl every 5 minutes.
Despite all of this the chatbot stops working after some inactivity; sometime after 10 minutes, other times after 1 hour or more. I really don’t understand what I am doing wrong.
If you have any suggestion on how to fix the problem I would be very grateful!

Please note that I have no experience in coding and I am not a software engineer. All I have done so far has been achieved through youtube tutorials and chatGPT coding.

Thank you for your help!

Welcome to the forums, @info1097!

You won’t need to, as you have a deployment.

Are you using the new deployment link (~.replit.app), instead of the dev url (~.~.replit.dev)?

I’m using the dev url replit.dev

Please replace any actual occurrences of the replit.dev url with the replit.app url provided by the deployment.

1 Like

should I replace it in the code where it’s mentioned: ping_keep_alive?

What about Uptimerobot? should i keep it and change the url even there?

I’m using Voiceflow to display the chatbot to my customers, should I use this replit.app url even there or should i keep the replit.dev?

Thank you!

You don’t need UpTimeRobot when you have a Revered VM deployment — that’s pretty much what it does. So remove UpTimeRobot, and replace all real use cases of the dev url with the deployment url.

Thank you very much for your help, I really appreciate that!

Voiceflow seems to like that url as well!

1 Like

Hey @info1097!

Unless you need further support, please mark this post as the solution if it solved your problem so people with the same issue can easily find the solution.

cc: @MattDESTROYER @Firepup650 @NateDhaliwal @SalladShooter

I waited 2 hours and the problem is back. My chatbot says: " Failed to create new thread!". What else could be the problem?