Rollback, stop and restart
Updated: 24 November 2026
Automatic rollback
If a new deployment became healthy and then fails within rollback.window_s (default 300 s), the platform rolls back automatically:
health_check_failed: three health checks in a row fail.crash_loop: the app crashes again after a restart.
The target is the newest earlier revision that ran healthy for at least 60 seconds. The failed deployment then stands at rolled_back, list_deployments shows the rollback with the actor system/auto-rollback, and get_project reports SERVICE_AUTO_ROLLED_BACK for 24 hours.
Turn it off or adjust it in the contract:
"rollback": { "auto": true, "on": ["health_check_failed", "crash_loop"], "window_s": 600 }A rollback by error rate (error_rate, error_rate_threshold) is planned but not available yet.
Manual rollback
rollback_deployment with project, service and target:
last_healthy(default): the newest earlier revision that was healthy before.- a revision number (
3) or revision ID (rev_…).
The rollback is a normal deployment without a rebuild. It resets the target revision's image, environment variables and size. External data (e.g. your database) is not reset.
If the service follows a tag with auto-deploy, a rollback pauses auto-deploy so the rolled-back image does not return at the next check. The next apply_deployment for the service or Resume in the portal continues it.
Which revision changed what is shown by list_deployments under changes (contract change compared with the revision before), see logs and troubleshooting.
Stop, start, restart
control_service with action:
| Action | Effect |
|---|---|
stop | Stops the instance, keeps configuration and revision. Also allowed during an emergency stop and a spending freeze. |
start | Starts the desired revision again, checks the budget first. |
restart | Starts a fresh instance of the same revision; the old one stops as soon as the new one is healthy. |
A service that a person stopped in the portal cannot be started or redeployed by any agent (ACCOUNT_RESTRICTED). Only a person starts it again. The same applies after a security stop due to scanning behaviour (stopped_by: "security").
A service that once ran healthy and then does not become healthy for 24 hours (it crashes again after every restart) is stopped by the platform (stopped_by: "crash_loop", notice CRASH_LOOP_STOPPED). Its place on the runner is freed, while stopped it only costs its volumes, and owners and admins get an e-mail. Unlike after a security stop, an agent may start it again or deploy a corrected version.
Sleep and wake (scale-to-zero)
Scale-to-zero is off until the contract turns it on: "availability": { "scale_to_zero": true } on the service. It pays off for rarely used apps such as demos, previews and internal tools. Without this setting a service runs all the time.
A public service with scale_to_zero: true that has received no request for availability.idle_timeout_min (default 15 minutes) sleeps: its instance stops, it takes no room on the runner and costs nothing. URL and custom domains stay valid. The next request wakes it: the edge holds the request, the platform starts the instance, and as soon as the health check passes, the request goes through. That takes a few seconds plus the app's start time; after 30 seconds without success the edge answers with 503 and Retry-After: 5.
get_projectshowsstatus: "sleeping"withasleep_sinceand the noticeSERVICE_ASLEEP, andstatus: "waking"while waking. The deployment history has the eventsasleep,wakeandawake(with the duration).check_servicewakes a sleeping service and reports it withwoke_up: true.- If the app does not start on waking, visitors see 503 and
get_projectthe noticeWAKE_FAILEDwith the reason; the next request tries again after a minute. Look for the cause withget_logsas usual. - Everything that comes through the edge and has passed rate limits and login counts as a request, including a still open WebSocket or stream connection. The platform's health checks do not count.
- Services with a volume sleep too. Their volume stays with all data on its runner and keeps costing (€0.15 per GB and month); the room in memory is freed. The service is woken only on its volume's runner. Backups continue during sleep.
- Cannot sleep: internal services (
public: false), workers without a port and services another service reaches viaconnects_to: connections in the private network do not go through the edge and cannot wake anyone. The plan says so for each service (SCALE_TO_ZEROorSCALE_TO_ZERO_NOT_POSSIBLEwith a reason). - Always awake is every service without
scale_to_zero: true(default) and every one withmin_instances: 1. Keep awake: webhooks with a short timeout, apps with a long start time and anything that should work without incoming requests. - Only the time the instance runs is billed, including the idle time until it falls asleep; waking itself costs nothing. The cost estimate for such services counts
typicalwith 176 hours andminwith 0; the budget is still checked against 24/7 (max).
Values and messages: limits.
Several instances
With availability.max_instances (1–3) that many instances of a service always run. If one fails, or its runner, the others keep serving, and more load does not need a larger instance:
{ "name": "web", "port": 8080, "access": "public", "availability": { "max_instances": 2 } }- Spread: The platform puts the instances on different runners. If only one has room right now, they share it instead of waiting;
get_projectthen shows the hintINSTANCES_ON_ONE_RUNNER. - Requests: The edge sends requests to the healthy instances in turn; a refused
GET,HEADorOPTIONSrequest without a body is tried once on the next one. Connections overconnects_toalso go to all healthy instances, each new connection to a random one. The app should therefore keep no state in memory that a second instance does not know (keep sessions in a database or a bucket). - Deploy: All new instances start next to the old ones. The deployment is
healthyonly once all are healthy; only then do the old ones stop. If one fails, the deployment isfailedand the old version keeps running. - Operation: If an instance is not healthy, the service is
degradeduntil it runs again;get_projectshows underinstanceshow many should run, are healthy and on how many runners.get_logsandget_metricscombine all instances and name the instance per line. - Cost: Each instance costs the price of its size;
plan_deploymentestimates N times that, and budget and credit are checked against it. - Maintenance window: when a runner has to restart in the maintenance window (Sundays and Wednesdays from 04:00), its instances start on another runner first (with a single instance too); services with a volume stay and are gone for about two minutes (limits).
- Not together with volumes (a volume belongs to exactly one instance; buckets are shared by all), jobs (
schedule) andscale_to_zero(CAPABILITY_UNSUPPORTED).
Values and messages: limits.
Limits
- At most 30 deployments per hour and project (deploys, rollbacks, starts and restarts together; one
apply_deploymentcounts once, however many services it changes). - A stopped service still takes its place in the quota and its hostname. If you no longer need it, delete it with
delete_serviceor the whole project withdelete_project; both free quota and name at once.