[英]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.