Intermittent Connection Issues with MS SQL

  1. Background: We host are Database on an MS SQL Server that we have connected to our Retool app. We use an SSH Tunnel and Bastion Host through Tailscale. My IT team has told me because of this we dont need to whitelist IPs and just use our unique retool org key.

  2. Issue: All queries execute in the MS SQL environment but in Retool there is frequent connection issues on some but not all queries. See attached screenshots for errors.

  3. Steps I've taken to troubleshoot: We have checked our SQL server settings and confirmed it is not a number of connections or timeout issue on that side. See attached for screenshot for connections configuration.

  4. Additional info: We are cloud hosted.

also recently saw this

I saw that as well when perusing some of your server logs, @danjacobini. :+1: I've pinged the owning team and will hopefully have an update for you soon.

After digging into this, I have some observations and ideas but no clear solution.

The logs confirm that there is an issue creating the initial connection pool, which is where the Failed to connect error comes from. Subsequent queries that were depending on having access via that same pool then fail with the aborted error message.

What's interesting, though, is that the initial timeout references a local IP - presumably the internal address of the VM running your MSSQL DB. This suggests that the request may be dying within your VPC. Do you have access to connection logs on your bastion? I'd like to at least confirm that we're reaching it when seeing these errors.

Hey @danjacobini - can you let me know if this has been a persistent issue? Or if you have any updates?