.Net Core 3.1 - Stuck on connection.open() in the Linux while connecting Sql Server

Viewed 525

.Net Core 3.1 stuck on the connection.open() method call on Linux machine as well as Docker, it is working sometimes and stuck sometimes. Don't know where is the actual issue.

I am using Microsoft.Data.SqlClient library for the connection, I have tried System.Data.SqlClient too getting the same issue.

Even tried to downgrade the .Net core version from 3.1 to 2.2 and 2.1

Tried with SQL Server 2008 R2 SP3, 2012 and 2017.

It is working fine on the Windows machine.

Thanks in advance.

1 Answers

My issue was resolved by changing the Connection Timeout from 0 to 30.

Connection Timeout 0 makes it stuck.

Related