Failed to connect to database: failed to connect to `user=user database=db`:

Hi all,

I’m new to Neon and currently setting up a project using Go with Neon and PostgreSQL. While following the connection string provided in the quickstart guide, I’m encountering a timeout error when trying to connect to the database.

Here’s what I’ve tried so far:

Using the connection string in my Go project results in an "operation timeout" error.
Pinged the database server (from the connection string) and received a timeout there as well.
I suspect it could be a network issue, but I’m not sure if I’ve missed any configuration steps. Any guidance would be greatly appreciated!

sample string used: postgresql://<username>:<password>@<hostname>:5432/<database_name>?sslmode=require


Thanks
Was this page helpful?