Ask coding questions

← Back to all posts
Why Is My Testing Bot Stopping Every Hour?

Hi Guys

I have been testing different bots now for the last 8 weeks or so, but just the last couple of days just before the one hour of an active test is met, the bot stops & I get the attached image message. I have tested several different bots and the results are exactly the same. I have not changed any of my Repl settings so something has changed within the Repl servers?


Always on doesn't really work well, or at least that's what it seems. I'm sure the replit team is working on fixing that.
You should use uptimerrobot to keep your repl alive by constantly pinging it (you'll have to have a mini flask server as well) to make sure it's always up.
As for the contents diverged, that can happen if you are typing code and your internet connection breaks, or if the program is writing to files programmatically, which are not always saved because that could have security threats. For discord bots and stuff that will need to be writing to documents programmatically, I've found that a none replit database works better.


thanks @InvisibleOne for your comment, yes I am using Uptime Robot with working mini flask server. The bots I am testing are crypto trading bots....up until 2 days ago, they ran seamlessly, writing the same data, to the same files that they have done for the last 2 months....then now, suddenly "contents diverged" appears and the bot test is ruined.


Your bot is writing to a file while you were offline and Replit get's confused. ALso to save resources, Replit stops repls from running after a while.


Use the "keep_alive" method to keep your bot from stopping. And if you are saving data to a file, don't do that and use Replit's built in database instead.


Hi @CosmicBear thanks for your feedback....I have Keep Alive activated, I have the bot on Uptime Robot, and I am not doing anything differently to what I have been doing for the last 2 months without any issues. The bot records the minimum amount of data in just two files, is lightweight & fast. Some kind of server block has been inserted within the last 2 days that overrides Always On at between 53 minutes to 57 minutes in the first hour of each run that stops the bot running. I am only running a single test bot at a just confused & frustrated about this.


@CoinzTrader I keep seeing that other people recently are having issues with Always On too.


@CosmicBear I am paying a monthly subscription specifically to ensure that my bot testing works un-interrupted, this new firewall appears purely to preserve server resources, which I would not have an issue with if I was using the free version....but paying a monthly sub to maintain Always On should do just that.