Replit deployment keeps sleeping: pick the deploy type that stays awake

By AI App Medic · Updated · Replit · Deploy · Hosting

The Repl runs while you are in the editor. You publish it, share the URL, and later a friend reports a long spinner, a timeout, or a bot that stopped responding overnight. This is usually not your Express or Flask code "randomly crashing". Replit has several ways to publish, and they do not all stay running.

The four deployment types

In the Publishing tool, open Adjust settings and look at Deployment type. Replit's current types are:

If you never changed the setting, you are almost certainly on Autoscale. That is the right default for many websites. It is the wrong default for a Discord bot, a webhook endpoint that must answer Stripe or Telegram in a few seconds, a socket that should stay open, or a job that runs in a loop with no incoming traffic.

Step 1: prove it is idle, not a crash

  1. Open the published app's logs in Replit around the time it "disappeared". A process that exits with an exception is a crash: fix the stack trace (out of memory, missing env var, unhandled promise). A quiet log and a slow first request after a gap is idle scaling.
  2. Hit the health path or home page twice. If the first request is slow or fails and the second is fine, you are looking at a cold start.
  3. Confirm the deployment type in Adjust settings, including machine power. A tiny machine can also die under load and look similar, but it usually leaves errors in the log.

Also check that you are opening the published URL, not the ephemeral editor preview, and that a custom domain still points at the current deployment.

Step 2: pick the type that matches the work

Stay on Autoscale if this is a user-facing site or API, traffic comes in bursts, and a short wait on the first visitor after a quiet period is acceptable. You can raise machine power or the maximum number of servers if it is slow under load rather than asleep.

Move to Reserved VM if any of these are true:

Use Static only for a site with no server. Use Scheduled for periodic tasks, perhaps alongside a web deployment, not as a replacement for one.

Step 3: change the type cleanly

You cannot always flip the type on a live deployment in place. The safe path is:

  1. Note the custom domain, secrets, run command, and port you already use.
  2. Unpublish or shut down the current deployment (the exact control is in the Publishing UI). Expect a short outage.
  3. Publish again, open Advanced / Adjust settings, and choose Reserved VM (or the type you want). Set the run command and port to what the app already used.
  4. Reconnect the custom domain and confirm secrets are present on the new deployment.
  5. Leave the URL idle for half an hour, then request it once. A Reserved VM should still respond quickly. An Autoscale deploy may be slow on that first hit; that is expected.

Reserved VM costs more than a sleeping Autoscale app. If the price is not worth it, another option is to host the always-on piece somewhere else (a small VPS, or a platform with a paid always-on tier) and keep the website on Autoscale or a static host.

Things that are not a deploy type problem

Once the public URL stays up for a quiet hour, you are done. If you are leaving Replit hosting altogether, treat it as a normal Node or Python deploy on the new host and copy env values carefully, the same way you would when moving a Lovable app off its built-in host.

FAQ

Why did it work in the Replit editor but not on the public URL?

The editor keeps your Repl awake while you are connected. A published Autoscale deployment can drop to zero servers when nobody is hitting it, so the next visitor waits for a cold start or sees a timeout.

Is Reserved VM the only way to stop it sleeping?

For a process that must run all the time, yes, Reserved VM is the type Replit documents as a dedicated machine that never sleeps. Autoscale is cheaper when traffic is bursty and a short wake-up is acceptable. Scheduled deployments run a command on a timetable and then stop; they are not a website.

Can I just ping the app every few minutes?

An external ping can reduce cold starts on some setups, but it is a workaround, it can still fail, and it may cost you request time on Autoscale. If uptime matters, change the deployment type or host somewhere that is always on.

Related guides