Upstream connect error or disconnect/reset before headers. reset reason: connection failure, transport failure reason: delayed connect error: 111

I’m trying to hook up a database to an Express app. It works fine locally, but when I try to load "/." I am shown this message:

upstream connect error or disconnect/reset before headers. reset reason: connection failure, transport failure reason: delayed connect error: 111

Checking the logs reveals the following error:

error: connection is insecure (try using `sslmode=require`)

I’ve tried using variations of sslmode=require (such as ssl=true), but they open a whole new can of worms that don’t seem to bring me any closer to deployment.

The app worked fine before I added the database. The database is the free Koyeb Postgres service, version 14 to match my local testing database.

Hi @Christopher_Johnston,

Do you still have this service running? I did not find any service linked to this account.

Thanks.

Hi @David,

Thanks for your reply. I took the service down as I was able to get it working on another platform. I’ve recreated it if you’d like to have a look. I’m interested to work out what was going on, I appreciate any advice you might have.

https://labour-klarrisa-black-and-white-development-064a4319.koyeb.app/

Chris