CommandTimeout vs ConnectionTimeout

Published 08-15-2006 1:23 PM | jokiz

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.

Filed under: ,

Comments

# Cesar Sanz said on October 19, 2007 9:32 AM:

Thanx for the aclaration, it helps me a lot.

Regards

# Wahm com the online magazine for work at home moms. said on May 28, 2008 7:07 AM:

Site build it work at home moms wahm. Work from home moms.