CommandTimeout vs ConnectionTimeout

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.

posted @ 2009-04-16 15:13  helloworld22  阅读(588)  评论(0编辑  收藏  举报