Prisma + Neon PostgreSQL Connection Timeout: Debugging Node.js IPv4/IPv6 Issues on Windows
Tags: Node.js, Prisma, PostgreSQL, Neon, Networking, Debugging
I recently encountered a frustrating database connectivity issue while working on a Next.js application using Prisma 7.8.0 and Neon PostgreSQL.
My database queries were failing with connection timeouts. Initially, I suspected Prisma, the Neon serverless adapter, or even the database itself.
But after investigating the problem layer by layer, I discovered something more interesting: the issue was related to how Node.js handled network connections in an environment where IPv4 was working but IPv6 connectivity was unavailable.
In this article, I'll explain how I investigated the problem, the tests I performed, what the evidence revealed, and the configuration that eventually fixed it.