简体   繁体   English

.Net Core 3.1 - 在连接 Sql Server 时卡在 Linux 中的 connection.open()

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

.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. .Net Core 3.1 卡在 Linux 机器和 Docker 上的connection.open()方法调用上,它有时工作,有时卡住。 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.我正在使用Microsoft.Data.SqlClient库进行连接,我也尝试过System.Data.SqlClient也遇到了同样的问题。

Even tried to downgrade the .Net core version from 3.1 to 2.2 and 2.1甚至试图将 .Net 核心版本从 3.1 降级到 2.2 和 2.1

Tried with SQL Server 2008 R2 SP3 , 2012 and 2017 .尝试与SQL Server 2008 R2 SP3,20122017年

It is working fine on the Windows machine.它在 Windows 机器上运行良好。

Thanks in advance.提前致谢。

My issue was resolved by changing the Connection Timeout from 0 to 30.我的问题已通过将连接超时从 0 更改为 30 来解决。

Connection Timeout 0 makes it stuck.连接超时 0 使其卡住。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM