PostGresQL Azure unstable connection

Hey,
I'm new to retool, have been tinkering with it for a few weeks with a local resource. My goal is to setup a connection to a remote PostGresSQL DB at Azure. Connecting to the resource sometimes works but a lot of times not. When I test the connection 10 times randomly during the day it will not connect approx. 7-8 times - resulting in a time out. I tried several days/weeks now & googled to find the problem.
I connect to eu-central Frankfurt, whitelisted the IPs.
The thing that pounders me is trying it with similar software like Appsmith works everytime with the same settings.
I really would like to use retool but with an unstable connection it is no option.
Any one encountered this problem?
Tx,
Jurgen

Are you connecting to port 5432 or through PgBouncer through 6432? I’ve found (depending on the type of Azure DB) that connections can get maxed out without PgBouncer and that can help.

If that doesn’t help, what specific error do you receive, and how exactly are you connecting the resource?

Hey,
Yes, I connect direct via port 5432. I still think it is weird to get a "Connection terminated due to connection time out" so often while I got appsmith and now also UI Bakery working stable with the same resource without any hassle. I'll try the PGBouncer 6432 next. Tx for the input!

Hi Jurgen - I use Azure SQL DB and the Frankfurt outbound region. In the Azure portal, it won't accept CIDR notation for the IP address in the firewall config. Have you tried specifying an IP range in the firewall config of 3.77.79.248 to 3.77.79.251 as the /30 is effectively specifying four IP addresses?

1 Like

Hey Stu,
I tried this and the connection is working stable now for the entire day !
Thank you for the solution!
Jurgen

1 Like

Great stuff, we've been using Azure for the last 18 months and it's rock solid (hopefully I haven't now jinxed it!).

All the best with your new app.

1 Like