Hi,
I have a Flask app set up in the App platform and a separate managed PostgreSQL database. I can connect to the database, but when I try to connect to a connection pool on the database it is unable to do it, it just times out.
I can access the pool through my local machine and through an Ubuntu droplet without any problems. I’m trying to work out why it won’t work through the App platform and I’ve run out of ideas, so any help would be greatly appreciated!
Thanks! Robert
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.
Looks like I got the same issue. The app worked fine without a pool, and works with pool while running on my local machine, but not in the cloud. I’m using Golang + github.com/jackc/pgx/v4/pgxpool
Hi there,
In case you have secured your Managed PostgreSQL instance, you would also need to add the App Platform to the trusted sources as described in the following steps here:
https://docs.digitalocean.com/products/app-platform/how-to/manage-databases/
Let me know how it goes! Best, Bobby