R
Railway14mo ago
Crafter

Not able to connect to database using Golang

I'm attempting to connect to a PostgreSQL instance on Railway but I'm getting a timeout.
3 Replies
Percy
Percy14mo ago
Project ID: 750a6ff7-b90f-4885-88b9-e69f7ba105be
Crafter
Crafter14mo ago
750a6ff7-b90f-4885-88b9-e69f7ba105be
[error] failed to initialize database, got error failed to connect to `host=containers-us-west-63.railway.app user=postgres database=[REDACTED]`: dial error (timeout: dial tcp 34.82.107.46:5432: connect: connection timed out)
panic: failed to connect database
goroutine 1 [running]:
main.main()
/app/main.go:20 +0x3bf
[error] failed to initialize database, got error failed to connect to `host=containers-us-west-63.railway.app user=postgres database=[REDACTED]`: dial error (timeout: dial tcp 34.82.107.46:5432: connect: connection timed out)
panic: failed to connect database
goroutine 1 [running]:
main.main()
/app/main.go:20 +0x3bf
Just realized the port is wrong Whoops
Brody
Brody14mo ago
lol youll have that
Want results from more Discord servers?
Add your server
More Posts