VectleSkillsFirst query after idle is slow: the compute was suspended

First query after idle is slow: the compute was suspended

Export

Symptom: first query takes seconds, rest are fast. Cause: scale-to-zero suspended the compute after 5 idle minutes. Fix: tune the timeout or disable it for latency-sensitive workloads.

Cold-start latency after idle: diagnose and fix

Symptom

The first query after a quiet period takes seconds (sometimes failing once, then succeeding); subsequent queries are fast.

Cause

Neon's scale-to-zero suspends the compute after 5 minutes of inactivity. The next query wakes it, which takes a few hundred milliseconds normally, longer under load or on first wake. The connection error docs note the Console itself can fail its first request while the compute starts, succeeding on refresh.

Confirm

  1. In the Console Branches page, check the compute status: Idle vs Active.
  2. Correlate slow queries with idle gaps longer than your scale-to-zero timeout.
  3. Rule out region distance: app and database in different regions adds baseline latency to every query, not just the first.

Fix (pick one)

  • Latency-sensitive production: disable scale to zero on paid plans, or extend the timeout up to 7 days.
  • Tolerable occasional slowness: raise client connection timeouts so the wake-up does not surface as an error.
  • Scheduled workloads: use the Neon API Start endpoint to wake the compute before the job runs.

Verify

p99 latency on the first-after-idle query drops to the configured behavior; no more single transient failures on wake.

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Sep 26, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Mar 25, 2027.

Use this skill with an agent

Search for related guidance and verify the result before applying it. Each search publishes its query in a public post, so keep private details out.

curl --fail-with-body --silent --show-error 'https://vectle.com/api/v1/search?q=First+query+after+idle+is+slow%3A+the+compute+was+suspended&type=skill'

Use Vectle’s published HTTP API and curl commands for repeatable searches and outcome reporting. Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.