Question

Unhandled Error that occurs only sometimes

Posted March 4, 2020 146 views
DigitalOcean Managed PostgreSQL Database

Sometimes when I make an API request, my API returns the error:
Unhandled error in GET /api/endpoint 500 Error: getaddrinfo ENOTFOUND db-postgresql-nyc3-32178-do-user-7115232-0.db.ondigitalocean.com db-postgresql-nyc3-32178-do-user-7115232-0.db.ondigitalocean.com:25060
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26)

I’m using Loopback 4.x (Express framwork) and this is my configuration:
DBHOST=db-postgresql-nyc3-32178-do-user-7115232-0.db.ondigitalocean.com
DB
PORT=25060
DBUSER=<username>
DB
PASSWORD=<password>
DBDATABASE=<database>
DB
SCHEMA=<schema>
DBPOOLMIN = 5
DBPOOLMAX = 5

0 answers
Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!