Iain Jones, Firstly, apologies for the delayed response from over the weekend.
From the issue description and based on the error message you provided; it seems that the ODBC connection is timing out when connecting to your SQL server. One possible cause of this issue is hitting a limit while making new outbound connections. The limits you can hit include TCP connections and SNAT ports.
I understand that you have validated firewall rules and connectivity, and that TCP 1433 connectivity is OK. However, ODBC connectivity fails. You also mentioned that hybrid connections have been created to support connectivity, and substituting the FQDN with the short name as defined in the relay/hybrid connection then this connects without issue.
It is possible that the issue is related to the VNet Integration for outbound connectivity to key resources including SQL. You mentioned that you have checked DNS and firewalls/NSGs/Routes and no issues and VNet Integration is set to Route All. However, it only seems to be ODBC over the VNet Integration connection that is failing.
Just to isolate/one possible solution to avoid SNAT port limitations is to use connection pools. By pooling your connections, you could avoid opening new network connections for calls to the same address and port.
Another approach is to use service endpoints or private endpoints. If your destination is an Azure service that supports service endpoints, you could avoid SNAT port exhaustion issues by using regional VNet Integration and service endpoints or private endpoints. When you use regional VNet Integration and place service endpoints on the integration subnet, your app outbound traffic to those services will not have outbound SNAT port restrictions. Likewise, if you use regional VNet Integration and private endpoints, you will not have any outbound SNAT port issues to that destination.
Also, ff your destination is an external endpoint outside of Azure, using a NAT gateway gives you 64k outbound SNAT ports. It also gives you a dedicated outbound address that you don't share with anybody.
Reference: Troubleshooting intermittent outbound connection errors in Azure App Service
--You may always leverage App Service diagnostics from Azure Portal> Navigate to your App Service app in the Azure Portal. (screenshot below)
In the left navigation, click on Diagnose and solve problems
- Review and run – Network troubleshooter