Error: connect ETIMEDOUT

Posted September 22, 2021 65 views
Node.jsDigitalOceanDeploymentDigitalOcean Managed PostgreSQL Database

Getting this error Error: connect ETIMEDOUT I have deployed the nodejs app and connecting it to postgresql cloud database and getting this error.

Here is my setup using connection string: postgresql://

XXXXX are the credentials and I have checked these are correct. not sure what’s going on and further I am using pg.js package for postgresql


These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer


I could suggest a few things here:

  • Make sure that you have added your Droplet to the Managed Database Access control list. That way you will make sure that the Droplet has network access to the Managed Database:

  • If you have a firewall enabled on your Droplet, make sure that port 25060 is open for outgoing TCP connections.

Let me know how it goes!