sample-dockerfile icon indicating copy to clipboard operation
sample-dockerfile copied to clipboard

How can my app connect to database in App Platform

Open victor-felix opened this issue 4 years ago • 1 comments

My Database settings contains my API Service in the Trusted Sources list. The App Spec contains all Database configuration and my API Service configuration contains the Database's env variables, and reference the Dockerfile path. But, when the App Platform try to make a deploy and the process try to connect in database, the log emit the following error:

Error: connect ETIMEDOUT 1X.XXX.X.X:XXXXX [2022-10-04 21:52:36] at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1159:16) { [2022-10-04 21:52:36] errno: -110, [2022-10-04 21:52:36] code: 'ETIMEDOUT', [2022-10-04 21:52:36] syscall: 'connect', [2022-10-04 21:52:36] address: '1X.XXX.X.X', [2022-10-04 21:52:36] port: XXXXX [2022-10-04 21:52:36] }

victor-felix avatar Oct 04 '22 22:10 victor-felix

Hi @victor-felix, I can investigate this.

This ETIMEDOUT error is a classic sign that the connection is being blocked before it can be authenticated, which points to a firewall or VPC issue. Even with the correct env vars, the platform's ephemeral build container might not be included in the database's trusted sources.

I'm happy to dig in and find the root cause. May I be assigned?

shashankpatil28 avatar Oct 11 '25 18:10 shashankpatil28