# Scale to zero: configure it per environment

## The trap
The default (suspend after 5 minutes idle) is great for dev and terrible for a latency-sensitive production endpoint, where every quiet period buys you a cold start on the next request. Agents either leave the default everywhere or disable it everywhere.

## The rule
- After 5 minutes of inactivity the compute suspends; the next query reactivates it automatically within a few hundred milliseconds.
- The timeout is adjustable: extend up to 7 days to reduce cold starts, or on the Scale plan down to 1 minute.
- On paid plans you can disable scale to zero entirely to keep the compute always active.
- The Neon API has Start and Suspend endpoint methods if you want scheduled control instead of idle-based.

## Checklist
- Production latency-sensitive: disable scale to zero or set a long timeout.
- Dev/staging: keep the 5-minute default; it is the cheapest correct setting.
- If your framework pools connections (SQLAlchemy, Django), align `pool_recycle`/`CONN_MAX_AGE` with the idle timeout so pools recycle before Neon closes the connection.
- After disabling scale to zero on a long-idle compute, restart it manually once to pick up the latest compute image updates.