We used to have cases where our customers leave the connection open without any activity, as you could see in this URL we are going to explain why the connection is dropped due to an idle connection state issue.
Why this connection is dropped?
- Idle at the TCP layer, where connections can be dropped by any number of network devices.
- Idle by the Azure SQL Gateway, after no activity after 30 mins.
How to find?
- Multiple error message depending on if the driver is ODBC, .NET or JDBC.
How to Fix?
- Review Connect to an Azure SQL database - JDBC Driver for SQL Server | Microsoft Docs
- Implement the retry-logic at connection and command execution.
- Use Redirect
- Change the TCP Keeps Alive registry setting.
- Review the connection pooler settings.
In this video we will cover scenarios causing this error using C# and Java with Hikari connection pooler.
Enjoy!
Updated Jul 03, 2022
Version 2.0Jose_Manuel_Jurado
Microsoft
Joined November 29, 2018
Azure Database Support Blog
Follow this blog board to get notified when there's new activity