I’m having trouble keeping my Discord bot running on Replit. Every time I deploy it, the bot works fine for about an hour, then it just stops responding and goes offline. I’ve tried restarting the repl multiple times, but the same thing keeps happening. The bot runs perfectly when I test it locally on my computer, so I know the code isn’t the issue. I’m wondering if this has something to do with Replit’s free tier limitations or if there’s a specific configuration I need to set up to keep it running continuously. Has anyone else experienced this problem with Discord bots on Replit? What’s the best way to prevent the bot from going offline after such a short time? I really need it to stay online 24/7 for my server members.
It seems you’re encountering the Replit free tier’s inactivity timeout, which affects your bot’s online status. A viable workaround is using a service like UptimeRobot to regularly ping the bot’s endpoint. Ensure you have a basic web server running for this to work effectively. However, be aware that this doesn’t guarantee 100% uptime, as the bot could still experience downtime during server maintenance. For a more reliable solution, consider upgrading to a VPS or dedicated hosting.
Yeah, this is classic Replit free tier behavior - containers go to sleep when they’re not active. I hit the same wall with my first Discord bot. That one-hour window you’re seeing is exactly their resource management kicking in. Ping services might work for a bit, but Replit’s gotten way better at catching and blocking those tricks. I ended up moving to Railway or one of Heroku’s free alternatives - way more reliable. If you’re dead set on Replit, their paid Hacker plan kills the sleep issue. Otherwise you’re gonna be dealing with constant restarts.
Replit’s free tier is notorious for this. Had the same issue last month and switched to render.com - their free tier gives way better uptime for bots. You could try Replit’s “always on” feature but that costs money. Quick fix is adding a simple HTTP server to your bot code so external pings work, but don’t expect miracles.