On-demand apps that sleep and wake
Free apps now sleep after a period without traffic and wake automatically on the next request, and eligible Pro services can opt in per service.
Free apps no longer pause after 7 days of inactivity. They sleep after a period without traffic or active requests, and the next visit wakes them automatically, without a new deployment. The first request after a sleep may take longer while the app starts. Free apps that were paused for inactivity wake the same way; an app you stopped yourself stays stopped.
Sleeping removes the running copy of the app, so memory and temporary files are reset. On-demand apps should keep data they need in an external database or storage. Background timers are not guaranteed to run while the app is idle. WebSockets and streaming responses keep it awake.
Opt in on Pro
Pro services stay always-on by default. Turn on On-demand in a service’s settings to let it sleep when idle as well. Sleeping time does not count toward compute usage, and the spend forecast in Billing uses how long the service was actually awake over the last 7 days.
On-demand is available for repository and upload services that serve HTTP with one fixed replica. Dockerfile builds, images, workers, persistent volumes, autoscaling and pre-warm windows keep the service always-on, and the setting explains why.
Services that call each other
When an app wakes, the on-demand services it references with ${{services.X}} wake with it, and a service is never put to sleep while another service that uses it is running.
See pricing for what each plan includes.