Stop and resume
When there are no requests, the worker stops running and starts again automatically on the next request. Your data and settings are kept.
runlot shuts down the worker process of a project that has received no requests for a while, to reduce memory usage. The internal name for this state is park, and no data is deleted.
When a project stops automatically
The default idle time is 5 minutes. The worker process is shut down when all of the following are true.
- Five minutes have passed since the last HTTP request and the last database access.
- There are no open database connections.
- No backup, restore, or migration is in progress.
What is kept
Only the worker process is shut down. The data directory, the deploy bundle, and the database files are kept. In our measurements, resident memory per project dropped from about 125 MB to zero.
The project status and placement details in the dashboard do not change, and the project is still shown as "active". Stopping is handled inside the node.
When a new request arrives
When the first request arrives, the worker process is started and the request is forwarded once it is ready. The numbers below are measurements, not response times guaranteed in every environment.
| Item | Measurement |
|---|---|
| Response time of the first request after a stop (p50) | 0.36 s |
| Maximum response time under the same conditions | 0.40 s |
| 64 projects resumed | 64/64 succeeded |
After the process starts, we verify that it can actually accept connections. This step prevents a request from being forwarded before the worker is ready.
Backups for stopped projects
When a backup is due, the project is started briefly, the backup is taken, and it is stopped again. Projects you are not using do not skip their scheduled backups.
Billing
No compute usage accrues while a project is stopped. There is no difference on the free plan today, but once paid plans arrive this is what reduces compute cost during idle periods.
This is different from suspend, where an admin suspends a project. A project that stopped automatically runs again on the next request, so there is nothing for you to restart.
When the node is short on disk space
If the node runs short on disk space, the databases of idle projects can be encrypted and moved to external storage. A project in that situation enters the cold state, and its database has to be restored first on the next request. In our measurements this took about 6–7 seconds. For details, see Cold state and resume.