命令超时和连接超时之间的差异 [英] Difference between command timeout and connection time out

查看:67
本文介绍了命令超时和连接超时之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

连接超时和命令超时有什么区别?

What is the difference between connection timeout and command timeout?

在我们的应用程序中,有时会显示超时错误.当我们将命令超时值从默认值30增加到100(默认值)时,它就起作用了.增加命令超时值是否有任何问题.

In our application sometimes it is showing a timeout error. When we increased the command timeout value to 100(from default 30), its working. Is there any issue in increasing the command timeout value.

谢谢,
马赫什

推荐答案

如上所述,连接超时是与数据库服务器建立连接的超时.命令超时是命令执行超时.

As mentioned connection timeout is timeout for establishing connection with DB server. Command timeout is timeout for command execution.

可能会延长命令超时,但是在ASP.NET中执行此操作时,您还应该知道请求执行超时.您可以通过 Server.ScriptTimeout 在代码中进行设置,也可以在 httpRuntime/@ executionTimeout 中进行全局设置..NET 2.0+的默认值为110s.

Extending command timeout is possible but when doing this in ASP.NET you should be also aware of request execution timeout. You can set it in code via Server.ScriptTimeout or globally in httpRuntime/@executionTimeout. Default value for .NET 2.0+ is 110s.

但是通常,这很可能是构建应用程序的错误方法.除非您进行一些繁重的在线报告,否则很少会执行该报告.

But generally this is most probably wrong way to architect application. Unless you are doing some heavy online reporting wich will be rarely executed no one will want to use it.

这篇关于命令超时和连接超时之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆