您的位置:首页 > 其它

CommandTimeout vs ConnectionTimeout

2009-04-16 15:13 253 查看
ConnectionTimeout is the one specified in your connection string and it is the time it takes for a connection.Open() invocation to wait until it gets a connection reference from the connection pool. (Default value is 15 seconds)

CommandTimeout on the other hand is the maximum time for a specific sql command to execute. (Default value is 30 seconds)

If you are doing a bulk insert, etc. you might consider increasing the default commandtimeout. anyone who uses a limit of 0 for any of the two configurations? i believe it is not a good practice for applications to be waiting for life in a deadlock or connection full scenarios.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: