This post has been republished via RSS; it originally appeared at: Microsoft Tech Community - Latest Blogs - .
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!