Prioritize responsiveness
Reduce cold starts for an intermittently used application by keeping its compute active longer.
Neon · Const
suspend_timeout_seconds sets the inactivity delay before a Neon compute scales to zero. The default is 300 seconds; supported plans can customize it, disable suspension with -1, or use 0 for the plan default.
suspend_timeout_seconds controls how long a compute endpoint may remain inactive before Neon scales it to zero. Use zero for the plan default, a positive number for a custom delay, or negative one to keep the endpoint from suspending; the permitted range depends on the plan.
"suspend_timeout_seconds": <integer>| Name | Type | Description |
|---|---|---|
suspend_timeout_seconds | integer, optional, int64 | Scale-to-zero idle timeout in seconds before the compute suspends; 0 uses the plan default and -1 disables scale-to-zero. |
curl --request PATCH \
--url https://console.neon.tech/api/v2/projects/$PROJECT_ID/endpoints/$ENDPOINT_ID \
--header "authorization: Bearer $NEON_API_KEY" \
--header "content-type: application/json" \
--data '{"endpoint":{"suspend_timeout_seconds":600}}'Sets the endpoint to suspend after 10 minutes of inactivity.
Reduce cold starts for an intermittently used application by keeping its compute active longer.
Lower compute costs for development or low-traffic environments by allowing faster scale-to-zero.
Keep a production compute continuously available when the plan supports disabling scale-to-zero.
suspend_timeout_seconds is the inactivity duration, measured in seconds, before a compute scales to zero. A value of 0 selects the plan default, while -1 disables scale-to-zero.
Follow-up: What limits apply to custom values? The minimum depends on the plan, and the documented maximum is 604800 seconds, or one week.
The default timeout is 300 seconds, equivalent to five minutes. A custom positive value changes how long an idle compute remains available before suspension.
Follow-up: How would you preserve an always-on endpoint? Set the value to -1, which disables scale-to-zero, subject to the plan's capabilities.
Send a PATCH request to the endpoint update API with the endpoint ID and a body containing suspend_timeout_seconds. The project ID and compute endpoint ID identify the resource being changed.
Follow-up: What operational detail matters after the PATCH? The client should wait for the current operation to finish before using the endpoint.
scale to zerocompute endpointautoscaling_limit_min_cuautoscaling_limit_max_cuUpdate compute endpoint API