![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm calling off a stored procedure from C# (using ADO.net). Sometimes it returns data but sometimes it throws a timeout exception. I'm running SQL Server Profiler on the server, and RPC:Completed in each case, even when it times out at the client. When it times out, Duration is fairly long (around 400,000). I can't seem to see any patterns, like it always times out on these parameters but not those, etc... What can I do to find out what's going on here? |
#3
| |||
| |||
|
|
I'm calling off a stored procedure from C# (using ADO.net). Sometimes it returns data but sometimes it throws a timeout exception. I'm running SQL Server Profiler on the server, and RPC:Completed in each case, even when it times out at the client. When it times out, Duration is fairly long (around 400,000). I can't seem to see any patterns, like it always times out on these parameters but not those, etc... What can I do to find out what's going on here? |
#4
| |||
| |||
|
|
Since you never have problems running from Management Studio and the problems when running from ADO.net are timeouts, it's obvious what the direct problem is. Management Studio has no default timeout setting, and ADO.net has. Change your C# code to set a longer timeout or disable it completely and THAT problem will be gone. |
#5
| |||
| |||
|
|
Oddly enough, when I run the sproc in Management Studio it returns in a normal amount of time. But when this problem happens from ADO.net, it feels like the sproc is taking forever. I've gone so far as: 1) run the sproc from ADO.net. 2) when I've looked at the hourglass for a while, I assume that the problem is happening and I 3) quickly run the sproc from Management Studio. When I do this, Mangement Studio runs it just fine. The data is returned in the normal amount of time. This is WHILE my C# app is still displaying an hourglass. Then a little while later, I get the timeout error. Its like, running it from ADO.net is doing something differently from running it in Management Studio. |
![]() |
| Thread Tools | |
| Display Modes | |
| |