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!


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

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:


Let me know how it goes!

  • Hi Bobby,

    Thanks for the reply! I think I might not have explained the problem well. I have added the App Platform to the trusted sources for the database, and I can successfully access the database through the App Platform. The problem, however, is with the connection pool that I have set up on the database, when I try to connect to the pool through the App Platform, it times out. I believe it is the same problem as in this question: https://www.digitalocean.com/community/questions/how-to-connect-to-pgbouncer-in-app-platform

    I think trusted sources apply to the whole database cluster, which should include the pool, but unfortunately something is happening in the App Platform to block access to the connection pool, and I’m not sure what…