Reduce idle compute usage
Development and test databases that are idle for long periods.
Neon · Const
Neon Scale to Zero suspends an inactive Postgres compute after a timeout and resumes it when a query arrives. It reduces compute usage for intermittently used databases, with a brief startup delay on the first query after suspension.
Neon suspends an inactive Postgres compute after its scale-to-zero timeout, reducing compute charges while the database is unused. A later query automatically resumes the compute, but the first request can experience a brief startup delay. The setting can be changed in compute configuration subject to plan and size limits.
const sql = neon(process.env.DATABASE_URL);
const rows = await sql`SELECT now()`;
console.log(rows);Run a normal query; if the compute is suspended, Neon resumes it automatically.
Development and test databases that are idle for long periods.
Intermittently used production services where a brief cold start is acceptable.
Applications that need consistently low latency and can use a paid plan.
Scale to zero suspends a compute after it has been inactive for the configured period. This lowers compute usage for databases that are not continuously active, and a later query resumes the compute automatically.
Follow-up: What latency trade-off does this create? The first query after suspension can take a few hundred milliseconds longer while the compute starts.
The default inactivity period is 5 minutes, represented by 300 seconds in the API. The documented API range is 60 seconds to 604800 seconds, although plan rules determine which values are available.
Follow-up: Which plan has a fixed value? The Free plan keeps the setting fixed at 5 minutes.
Scale to zero applies only to computes up to 16 CU. Larger computes remain active, so they cannot use this suspension behavior.
Follow-up: Why might a production team disable it? Workloads requiring consistently low latency may avoid cold-start delay by keeping the compute active where the plan permits.
Compute lifecyclesuspend_timeout_secondsCompute defaultsConfiguring scale to zero for Neon computes