Neon Performance Stability Cost

Edge route uses pg driver — Neon connections will exhaust on cold starts

Part of the Connection pooling check · fix arrives as a guide

What it is

An edge-runtime route uses the pg driver to reach Neon over a raw TCP connection.

Why it matters

The edge runtime has no persistent TCP, so every invocation opens a fresh connection. Under any real concurrency that exhausts the Postgres connection limit, and the failure arrives all at once during a traffic spike.

How to fix it

Use @neondatabase/serverless, which reaches Neon over HTTP or WebSocket and is built for this runtime. Point it at the pooled endpoint so connections are shared rather than per-invocation.

Run them all on your app

Connect your repo and your live services with read-only scopes. The first scan is free, and nothing changes without your approval.