加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

sql-server – 加载到IIS Web服务器后的SQL Server连接超时

发布时间:2020-12-12 16:59:36 所属栏目:MsSql教程 来源:网络整理
导读:我们在 Windows 2008 r2上运行了MSSQL 2008 R2,它被运行asp.net的2台服务器2008 r2 web服务器所击中.两者都连接到活动目录域,并使用集成身份验证连接到SQL Server. IIS应用程序池上设置了用户名/密码.这在过去一年左右一直在完美运作. 我们最近想要启动新的We
我们在 Windows 2008 r2上运行了MSSQL 2008 R2,它被运行asp.net的2台服务器2008 r2 web服务器所击中.两者都连接到活动目录域,并使用集成身份验证连接到SQL Server. IIS应用程序池上设置了用户名/密码.这在过去一年左右一直在完美运作.

我们最近想要启动新的Web服务器,并且我配置了一个运行完全相同网站的新Windows 2012 R2,并使用相同的用户名/密码配置了IIS应用程序池.当我进行测试时,该网站连接并运行良好.但是只要我将任何实际负载带到服务器上,我就会看到IIS开始挂起并请求开始堆积.

我拿了一个内存转储并在其上使用了新的DebugDiag 2.0分析,看到请求在打开sql连接时挂起:

This thread is trying to open a data base connection

The connection String is Data Source=10.81.73.66;Failover Partner=10.81.73.72;Initial Catalog=XXXX;Integrated
Security=True;Max Pool Size=6000;Connect Timeout=30;Network
Library=dbmssocn;Application Name=EntityFrameworkMUE and the
connection timeout is set to be 30 seconds.

在分析中,我看到了很多例外:

Connection Timeout Expired. The timeout period elapsed while
attempting to consume the pre-login handshake acknowledgement. This
could be because the pre-login handshake failed or the server was
unable to respond back in time. This failure occured while attempting
to connect to the Principle server. The duration spent while
attempting to connect to this server was – [Pre-Login]
initialization=3342; handshake=0;

关于尝试什么的任何想法?

解决方法

我们最终通过删除集成安全性解决了我们环境中的问题,并在连接字符串中指定了用户ID和密码.从来没有找到根本原因.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读