Neon Connection Timeout After Scale to Zero (Cold Start)

Share
Workaround available All (Node.js, Python, Prisma, Drizzle) Updated November 14, 2026Based on 3 user reportsHow we research

Quick answer

A Neon compute that idled for 5 minutes suspends and needs a moment to wake, so the first connection can time out. Raise the client connect timeout to 10-15 seconds and retry with backoff.

Most likely fix: Raise the client connection timeout

How to fix it

Try these in order — the most common fix is first.

  1. 1. Raise the client connection timeout

    1. Node.js pg: set connectionTimeoutMillis: 10000
    2. Python psycopg2: connect_timeout=10
    3. Prisma: append connect_timeout=15&pool_timeout=15 to the connection string
    Did this fix it?
  2. 2. Retry with exponential backoff

    1. Wrap the first connection in a retry (Neon docs example: 5 retries, 4 second minimum timeout, randomized jitter)
    2. Retry fast for brief blips, then back off
    Did this fix it?
  3. 3. Keep the compute awake on a paid plan

    1. Open the project in the Neon Console, then Branches, select the compute and Edit
    2. Turn off scale to zero, or extend the suspend timeout (Scale plan: 1 minute up to 7 days)
    3. If scale to zero is disabled, restart the compute about weekly to pick up compute image updates
    Did this fix it?
  4. 4. Cut connection setup time

    1. With a PostgreSQL 17 client add sslnegotiation=direct to the connection string
    2. Place your app in the same region as the Neon project
    Did this fix it?

Symptoms

First query after a quiet period hangs or fails with 'Couldn't connect to compute node', Prisma P1001 'Can't reach database server', or a client timeout. Later queries are fast.

Why it happens

  • Compute auto-suspends after 5 minutes idle (not changeable on the Free plan) and takes a few hundred milliseconds or more to wake
  • Client connect timeout shorter than the wake-up time (Prisma gives up early)
  • Network distance between app region and Neon region adds latency

This guide also covers

  • neon connection timeout
  • neon cold start
  • neon can't reach database server
  • neon scale to zero slow first query

Still not working?

If Neon keeps failing, you're not alone. See every Neon problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us
Fixed it? Share this guide

The same problem in other apps

All not loading, error messages & connection guides →

Other Neon errors

All 11 Neon errors and fixes →