N
Neon17mo ago
frozen-sapphire

Can't connect to Neon from fly.io

My app deployed on fly.io cannot connect to my Neon DB. I get:
NeonDbError: Error connecting to database: request to https://api.us-east-2.aws.neon.tech/sql failed, reason: socket hang up
NeonDbError: Error connecting to database: request to https://api.us-east-2.aws.neon.tech/sql failed, reason: socket hang up
on every request. I've been troubleshooting this for hours, can't figure it out, fly.io forums are no help. My code works on local and on Cloudflare Pages. Pls help 😭
1 Reply
frozen-sapphire
frozen-sapphireOP17mo ago
doesn't work from railway either, exact same error, so it's definitely neon specific in case anyone else encounters this, it was my fault; i'm moving over from a serverless environment and was using the neon-serverless driver. needed to switch over to something like postgres-js

Did you find this page helpful?