Free Hosting

Free Hosting Without Sleep Mode: Why It Matters

Why "sleep mode" on free platforms breaks Discord and Telegram bots, why keep-alive pingers are a fragile workaround, and how to tell whether a host really stays awake.

On this page
  1. What sleep mode is
  2. How sleep breaks a Discord bot
  3. How sleep breaks a Telegram bot
  4. The keep-alive workaround, and why it’s fragile
  5. What “no sleep mode” should mean
  6. How to check whether a host really stays awake
  7. Remove the workaround when you move
  8. Summary

“Your app will sleep after 15 minutes of inactivity.” For a website, that line is a reasonable way to save resources. For a bot, it’s a death sentence. This article explains what sleep mode is, exactly how it breaks bots, why the popular workarounds fall short, and how to check whether a host truly keeps your bot running.

What sleep mode is

Many free platforms were built for web applications. A web app only needs to run when someone requests a page, so to save money the platform stops your process when no HTTP requests arrive for a while — commonly 15 to 30 minutes — and starts it again when the next request comes in. That restart on demand is called a cold start.

For a website, the cost is a slow first page load. For a bot, it’s much worse.

How sleep breaks a Discord bot

A Discord bot doesn’t receive HTTP requests at all. It opens a WebSocket connection to Discord’s gateway and waits for events. From the platform’s point of view, nobody is visiting the app, so after the idle timeout it goes to sleep:

  1. The gateway connection closes. The bot shows as offline in every server.
  2. Nothing wakes it. Discord doesn’t send HTTP requests to your app — events only flow over the connection the bot itself opened. The bot stays asleep until something else happens to hit its URL.
  3. Events are missed. Commands fail, members join without a welcome, moderation rules don’t fire.
  4. Scheduled work stops. Reminders, timed punishments and periodic posts silently don’t happen.
  5. State may vanish. On platforms with ephemeral filesystems, a sleep-and-wake cycle can reset local files — SQLite databases and JSON data included.

How sleep breaks a Telegram bot

It depends on how the bot receives updates:

  • Long polling bots make outbound requests only, so the platform sees no inbound traffic and suspends them. Telegram holds updates for up to 24 hours, so messages eventually get answered — hours late — when something wakes the bot.
  • Webhook bots do receive HTTP requests, which wakes the platform. But every first message after a quiet period hits a cold start, adding seconds of delay, and background jobs still stop while the bot sleeps.

Either way, users experience a bot that’s unreliable at exactly the times — late at night, quiet weekends — when you’re not watching.

The keep-alive workaround, and why it’s fragile

The famous workaround is to add a tiny web server to your bot and point an external uptime service at it every few minutes, so the platform never sees the app as idle. It’s in thousands of tutorials. It also has real problems:

  • It may break the rules. Several platforms prohibit keep-alive pinging in their terms, and some detect and suspend accounts that do it.
  • It still restarts. Many platforms restart processes on a schedule or during maintenance regardless of traffic, and some cap monthly running hours on free plans — keeping the bot awake just uses the allowance up faster.
  • It adds a failure point. If the pinging service has an outage, changes its free tier or rate-limits you, your bot falls asleep.
  • It doesn’t fix the filesystem. Ephemeral storage is still ephemeral.
  • It’s code you have to maintain that has nothing to do with your bot.

It’s a clever patch over a platform that wasn’t designed for bots. A host built for long-running processes makes it unnecessary.

What “no sleep mode” should mean

A host that genuinely supports bots gives you:

  • A persistent process that runs until you stop it, with no idle timeout.
  • Supervision — if the process crashes, it’s restarted within seconds.
  • Persistent storage that survives restarts and redeploys.
  • Clear resource limits instead of vague “fair use”.

On Kerit Cloud, there is no sleep mode on any plan, free included. Your bot runs as a persistent process — no idle suspend, no cold starts — and a watchdog restarts it within seconds if it crashes. Storage is persistent NVMe. The free plan gives you 256 MB of RAM and 30% of an AMD EPYC core with no card and no time limit; see what the free tier includes.

How to check whether a host really stays awake

Don’t take any host’s word for it — including ours. Test it:

Log a heartbeat. Add a line that logs the time every five minutes:

setInterval(() => console.log(`heartbeat ${new Date().toISOString()}`), 5 * 60 * 1000);
async def heartbeat():
    while True:
        logging.info("heartbeat")
        await asyncio.sleep(300)

Leave it running overnight without touching it. Gaps in the timestamps mean the process was suspended.

Check the process uptime. Log the process start time on boot. If it changes when nobody deployed anything, the platform restarted your bot.

Watch the bot’s status. An external monitor that checks your bot’s presence — or a scheduled test command — will show whether it was reachable all night.

Read the plan’s small print. Search for “idle”, “inactive”, “spin down”, “sleep” and “hours per month”.

Remove the workaround when you move

If you migrate a bot from a sleeping platform to an always-on host, delete the keep-alive web server and cancel the external pinger. They no longer serve a purpose, and the fewer moving parts your bot has, the fewer things can break. If you want monitoring, point the uptime service at a real health check instead — see setting up uptime monitoring. Moving from Replit or a similar platform is covered in Replit alternatives for always-on bots.

Summary

Sleep mode stops processes that don’t receive HTTP traffic — which is fine for websites and fatal for bots. Discord bots drop offline and miss events; Telegram bots answer hours late or suffer cold starts; scheduled jobs stop; ephemeral files can vanish. Keep-alive pingers are a fragile patch that may break platform rules. Choose a host that runs persistent, supervised processes with persistent storage, and verify it with a simple overnight heartbeat.