Will this solution of setting CommandTimeout property of
SqlCommand object to some value work if there are around 4 threads trying to execute the database query parallely????? I mean won't it make the process of executing the queries at a slower rate??
Thanks for asking this. In my case there are transactions involved, although the query that causes the error isn't in one. I'm running unit tests inside Visual Studio that contact the DB and use transactions to not modify the DB. I'm using typed datasets
(unfortunately). For the calls that only get data, I'm not wrapping them in a TransactionScope. For things that do, I am. Thanks.
Actually, I'm just an idiot. For my problem, I was starting a transaction on test class initialize and rolling it back on test class cleanup, but the cleanup method wasn't being called when all the tests in the class had been run so some tables were locked
and caused (I'm assuming) other tests to deadlock and throw this timeout expired error.
Maybe not exactly like everyone else's issue, but this could be something to look out for if your getting this error.
prash_k1
Member
2 Points
1 Post
Re: Error: Timeout expired. The timeout period elapsed prior to completion of the operation or t...
Aug 18, 2008 12:36 PM|LINK
Will this solution of setting CommandTimeout property of SqlCommand object to some value work if there are around 4 threads trying to execute the database query parallely????? I mean won't it make the process of executing the queries at a slower rate??
Prashant Koli
Software Engineer
tvnarayana
Member
2 Points
1 Post
Re: Error: Timeout expired. The timeout period elapsed prior to completion of the operation or t...
Aug 21, 2008 03:20 PM|LINK
Hi Folks..really it's very nice code and very helpful i wud like thanks to the guy given this code...
bye..bye
sanjupillai
Member
2 Points
5 Posts
Re: Error: Timeout expired. The timeout period elapsed prior to completion of the operation or t...
Sep 19, 2008 08:05 PM|LINK
command timeout=0 doesn't work for me [:(]
sun_kumar421
Member
2 Points
1 Post
Re: Error: Timeout expired. The timeout period elapsed prior to completion of the operation or t...
Oct 04, 2008 07:34 AM|LINK
It dosen't work
AMR_PHASE
Participant
898 Points
167 Posts
Re: Error: Timeout expired. The timeout period elapsed prior to completion of the operation or t...
Oct 06, 2008 04:21 PM|LINK
Is this running inside a transaction?
Help me reach the next level, mark my post as the answer if it helped you reach a solution
ghw123
Member
241 Points
169 Posts
Re: Error: Timeout expired. The timeout period elapsed prior to completion of the operation or t...
Oct 23, 2008 03:15 AM|LINK
Excellent answer, sorted my problem.
dmorrison
Member
8 Points
5 Posts
Re: Error: Timeout expired. The timeout period elapsed prior to completion of the operation or t...
Dec 09, 2008 04:10 PM|LINK
Thanks for asking this. In my case there are transactions involved, although the query that causes the error isn't in one. I'm running unit tests inside Visual Studio that contact the DB and use transactions to not modify the DB. I'm using typed datasets (unfortunately). For the calls that only get data, I'm not wrapping them in a TransactionScope. For things that do, I am. Thanks.
unit testing transactions
dmorrison
Member
8 Points
5 Posts
Re: Error: Timeout expired. The timeout period elapsed prior to completion of the operation or t...
Dec 09, 2008 04:40 PM|LINK
Actually, I'm just an idiot. For my problem, I was starting a transaction on test class initialize and rolling it back on test class cleanup, but the cleanup method wasn't being called when all the tests in the class had been run so some tables were locked and caused (I'm assuming) other tests to deadlock and throw this timeout expired error.
Maybe not exactly like everyone else's issue, but this could be something to look out for if your getting this error.
database unit testing transactions
yyzpat
Member
2 Points
1 Post
Re: Error: Timeout expired. The timeout period elapsed prior to completion of the operation or t...
Dec 22, 2008 12:51 PM|LINK
Nuno said :
The solution is simple, change the CommandTimeout property of your SqlCommand object.
I TRY AND IT WORK !!!
Chancellor
Member
2 Points
18 Posts
Re: Error: Timeout expired. The timeout period elapsed prior to completion of the operation or t...
Jan 14, 2009 02:16 PM|LINK
I tried that and got a different error: Time-out occurred while waiting for buffer latch type 4 for page (1:180), database ID 6.