second connect to postgres fails

after a container is deployed (after the initial deployment) this error occurs when trying to connect to it via DATABASE_URL
40 | res = resolve

41 | rej = reject

42 | }).catch((err) => {

43 | // replace the stack trace that leads to `TCP.onStreamRead` with one that leads back to the

44 | // application that created the query

45 | Error.captureStackTrace(err)

^

ECONNREFUSED: Failed to connect

errno: 103

syscall: "connect"

at /app/node_modules/pg-pool/index.js:45:11

Bun v1.1.34 (Linux x64 baseline)

error: script "sponsor" exited with code 1
40 | res = resolve

41 | rej = reject

42 | }).catch((err) => {

43 | // replace the stack trace that leads to `TCP.onStreamRead` with one that leads back to the

44 | // application that created the query

45 | Error.captureStackTrace(err)

^

ECONNREFUSED: Failed to connect

errno: 103

syscall: "connect"

at /app/node_modules/pg-pool/index.js:45:11

Bun v1.1.34 (Linux x64 baseline)

error: script "sponsor" exited with code 1
Solution:
no worries. it seems to be fixed after destroying it and recreating it. it was an old project
Jump to solution
7 Replies
Percy
Percy2d ago
Project ID: 17ebdb2c-d451-4fe9-997a-dd53742e883a
gibsfinance
gibsfinanceOP2d ago
17ebdb2c-d451-4fe9-997a-dd53742e883a i am able to connect to the db from the public url, i am able to see the previous deployment's migrations as well if i delete the database and recreate it, the first deployment / connection to it works, then i redeploy a service and it can no longer be connected to
Brody
Brody2d ago
we cant help without a project, can you provide an id for a new project?
gibsfinance
gibsfinanceOP2d ago
i decided to try to reconstruct it. tearing it down and rebuilding it in the same config did the job. i also noticed that i was unable to change the port. maybe a state from the project being so old? anyway, issue is gone now
Brody
Brody2d ago
we have never allowed you to change the proxy port, it is random
gibsfinance
gibsfinanceOP18h ago
ah, no, the port going out to the generated url in the service that was connecting
Solution
gibsfinance
gibsfinance18h ago
no worries. it seems to be fixed after destroying it and recreating it. it was an old project
Want results from more Discord servers?
Add your server