N
Neon14mo ago
other-emerald

Connection Issues psql: error: connection to server, port 5432 failed: Connection refused

Hi I'm using Prisma and Next.js and have managed to connect my app to my neon db instance before but now the connection is being refused. I have two instances pointing to the same db, one locally (broken) and one from vercel (working). I've tried connection pooling but that doesn't seem to work either.
6 Replies
xenial-black
xenial-black14mo ago
Hey! Sorry to hear that you're running into an issue. Does this happen only locally?
other-emerald
other-emeraldOP14mo ago
Hi! Yep, only locally. My suspicion is that the DB instance can't handle multiple connections.
xenial-black
xenial-black14mo ago
That shouldn't be the case. Are you perhaps using a VPN?
other-emerald
other-emeraldOP14mo ago
Ah, I think the VPN might have been it. Could I ask why?
xenial-black
xenial-black14mo ago
there might be network routing issues that interfere with local connections or firewall settings that block PostgreSQL's default port. VPNs can also alter DNS settings, making it hard to resolve local hostnames
other-emerald
other-emeraldOP14mo ago
Thanks so much:)

Did you find this page helpful?