简体   繁体   English

Linq查询在本地计算机上运行良好,但在服务器上收到“连接已重置”错误

[英]Linq query runs fine on local machine, but get “The connection was reset” error on the server

I have a complex linq query with many joins, and other business rules, that is working fine on my local machine, but when it's deployed to the server, I keep getting a connection is reset error. 我有一个包含许多联接和其他业务规则的复杂linq查询,在我的本地计算机上运行良好,但是当将其部署到服务器时,我不断收到连接重置错误。

I split the query and made to visits to the server, and the error went away, but after adding a few more things to the query I'm getting it again. 我拆分了查询并访问了服务器,错误消失了,但是在查询中添加了更多内容后,我又得到了它。

Upon investigation it seems that the App pool is stopped IIS, as if the process is getting terminated by the server. 经调查,似乎该应用程序池已停止IIS,好像该进程已被服务器终止。

Although the query is complex, the outputted SQL executes in 14 seconds. 尽管查询很复杂,但是输出的SQL将在14秒内执行。 Does anyone know what could be happening or have any tips for debugging / solving this? 有谁知道会发生什么或有任何调试/解决问题的技巧?

Can you try to set CommandTimeout to Zero in your connection and Try again. 您能否尝试在连接中将CommandTimeout设置为零,然后重试。

Please Make sure "After Adding few more things" Extra Query not have any difference between your local and server. 请确保“添加更多内容后” Extra Query在您的本地服务器和服务器之间没有任何区别。

暂无
暂无

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

相关问题 Linq to SQL:查询在SQL Server Management Studio中运行良好,但在应用程序上超时 - Linq to SQL: Query runs fine in SQL Server Management Studio, but times out on the application LinqPad查询运行正常,但由于在Visual Studio中运行Linq to Entities错误而失败 - LinqPad query runs fine, but fails with Linq to Entities error running in visual studio 优化在Sql server中快速运行的LINQ查询? - Optimize LINQ query that runs fast in Sql server? 已创建目录,但未在服务器上创建文件,本地运行良好 - Directory is created but File is not getting created on server, local runs fine 与本地SQL Server的任何计算机连接 - any machine connection to local SQL Server Visual Studio 在本地机器上运行,服务器的 IP - Visual Studio runs on local machine with server's IP 相同的编码ui脚本如何在我的本地开发环境中正常运行,但出错了我的代理服务器 - How can the same Coded ui script runs fine on my local dev environment but error out my agent server Ajax自动完成CSS在iis和服务器上工作正常,但在本地计算机上工作不正常 - Ajax Auto complete Css works fine in iis and the server but not in local machine 服务器计算机上的程序集引用异常。 在本地运行良好 - Assembly reference exception on Server machine. Running fine on local 无法从远程计算机获取元数据,但是本地很好 - Couldn't get metadata from remote machine but local is fine
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM