Terminal or Vercel runtime logs

Error: Connection terminated unexpectedly / ETIMEDOUT connecting to *.neon.tech

What it means
Your app tried to open a connection to Neon and didn't get an answer in time.
Likely causes
  • Using a traditional long-lived TCP Postgres client in serverless routes instead of @neondatabase/serverless.
  • The Neon compute was waking up from scale-to-zero and the client timeout was set too low.
Prevention
Always connect to Neon in Next.js on Vercel using @neondatabase/serverless.

Copy for your agent

Connecting to Neon timed out. Confirm we use `@neondatabase/serverless` and the pooled Neon connection string, and retry.

Full help articleThe app can't connect to the database

Last reviewed Nov 8, 2026