Hello Vercel Community,
I'm experiencing a persistent PostgreSQL connection failure in a Vercel Preview deployment.
Environment
- Vercel Preview deployment (Node.js Function)
- Neon PostgreSQL
- PostgreSQL driver: pg 8.23.1
- API route: /api/qa/wallet/me
- Deployment ID: dpl_2Brf7ZAJhKxFQWU4fVr8jy3AyM3Q
Observed error
- HTTP status: 503
- Error code: QA_WALLET_UNAVAILABLE
- Stage: connection-handshake
- Internal code: ENOENT
- Syscall: open
What I've already checked
- The API route is deployed and reachable.
- Firebase authentication succeeds.
- The database client uses an explicit TCP hostname.
- No Unix socket, .pgpass, or local certificate file is explicitly configured.
- The pg driver loads successfully.
- The error occurs during database connection initialization.
I have repeatedly tested and redeployed the Preview environment, but the issue persists.
My questions
- Could this ENOENT/open error originate from Vercel's Node.js runtime or function bundling?
- Are there known issues with pg 8.23.1 and Neon PostgreSQL in Vercel Functions?
- Is there a way to identify which runtime component attempts the failed file open without exposing sensitive file paths or credentials?
- What is the recommended resolution?
I would appreciate guidance before making further changes to the application or deployment.
Thank you.