473,746 Members | 2,661 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ADO.NET Timeout Exception - I have tried everything

Hello!
I am looking for someone who has solved this multi-million people's
problem. EVERYONE seems to ahve this problem.

Im a creating a data set and populating it with a call to a store proc.

Its a complex stored proc with the end result as an insert to a temp
table. Then I do a select from the temp table - in the store proc.
I get the following sqlException error on the following line:
DataAdapterName .Fill(DataSetNa me, "TableName" )
The error is:
Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding.
My connectiong string looks like this:
<add key="cnITDevWin User" value="Data Source=server; Integrated
Security=SSPI; Initial Catalog=dbname; pooling=false;c onnection
reset=false;con nection lifetime=5;min pool size=1;max pool
size=10;connect ion timeout=120" />
I have admin rights on that db.
I have set my command.timeout to 500.
If i run this same code in a windows application, it works fine.
If I use a DataReader with the same storeProc, it works fine.
If I run this same code on a simple selec (hello world), it also works
fine.
If I run this store proc in QueryAnalyzer it works fine and is done
within 6 seconds.
If I run this on a different machine it produces the same result.
I am using SQL2000 with vb.net in VS2003.
I have looked everywhere for the answer. I can't find it anywhere.
PLEASE SOMEONE HELP.
regards,
Stas K.(a.k.a Sorcerdon)

May 18 '06 #1
4 6947
(so*******@gmai l.com) writes:
Im a creating a data set and populating it with a call to a store proc.

Its a complex stored proc with the end result as an insert to a temp
table. Then I do a select from the temp table - in the store proc.
I get the following sqlException error on the following line:
DataAdapterName .Fill(DataSetNa me, "TableName" )
The error is:
Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding.
How long time does take before you get the error? Since you say
that you've set the command timeout to 500, I expect it to take
three minutes, but I want to verify.
If I use a DataReader with the same storeProc, it works fine.


Since DataAdapter.Fil l more or less is just a wrapper on ExecuteReader,
this is funky. (Then again, that sounds like you have a workaround.)

I get the feeling that there is a blocking issue lurking here. When
you run DataAdapter.Fil l and are waiting for it to timeout, run sp_who
from Query Analyzer and look for non-zero values in the Blk column.
In such case the spid in the Blk column blocks the spid on this row.

--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
May 18 '06 #2
Erland,

Already done that. There are no locks.
I forgot to mention that in the original post.

regards,
Stas K (a.k.a Sorcerdon)

May 19 '06 #3
Sorcerdon (so*******@gmai l.com) writes:
Already done that. There are no locks.
I forgot to mention that in the original post.


I afraid then I don't have more suggestions with the information you have
given.

You could use Profiler to see if you get different query plans for
the different situations, althogh I don't see why that would happen.

Then again, there may be some pertinent information you have shared with
us.

--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
May 19 '06 #4
The problem is solved but a new mystery begins.
The problem was one of the parameters being passed is wrong.
but the mystery is that sql didnt return an error - it just froze....
intresting.

May 24 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
5512
by: Anders Borum | last post by:
Hello! I am working on improving my threading skills and came across a question. When working with the ReaderWriterLock class, I am getting an unhandled exception if I acquire a WriterLock with a timeout less than the time required to process the code section it protects. The code listed below is just a small application I wrote to check the behavious of the different threading / synchronization techniques. Basically the application...
1
3406
by: ArunPrakash | last post by:
Hi, I want to implement a method which will poll database for messages. But i want to provide a method that will specify a timeout until which it will be polled and after that it will throw an exception. I tried the following code. Here say for example GetString in class test is a method for which i want to provide timeout. Class1 contains the console application's main method
1
3177
by: Joey Chömpff | last post by:
Hello, When I'm uploading an file to a JRun WebServer (third party) with a Windows Forms application, l always get an TimeOut while uploading, all other request who doesn't request an post are going ok? Why? I've tried almost everything. I also tried the KB888528 solution but this also doesn't work. What can the KB887563 do for me? Machine( tried on Windows 2003 Server & WinXp)
1
12599
by: Jeff B | last post by:
I'm trying to create a simple screen scraping application and I kept getting a System.Net.WebException thrown back with a message of "The operation has timed-out." At first I thought it was some kind of connectivity issue on the machine. It didn't make sense though, because I can open up a browser on the same machine and easily browse the web. I'm stumped. I looked over my code for any errors and just couldn't find what I was doing...
5
13272
by: Jason | last post by:
Hi all I get the following error when executing a rather intense stored procedure from an ASPX page. I have tried: - Increasing timeouts on IIS 5.0 (all areas that even mention timeout) - use the "Connection Timeout=2400" string in the SqlConnection connections string - disabled connection pooling.
1
10431
by: Greg Allen | last post by:
I have a timeout issue with a long running web service, and I can't figure out where the timeout value is coming from. In the client I end up getting the following exception: The underlying connection was closed: An unexpected error occurred on a receive. at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
1
45173
by: Ron | last post by:
Hi, I had a stored procedure on SQL 2000 server to run calculation with large amount of data. When I called this stored procedure via System.Data.SqlClient.SqlCommand on production, i got error as: (i tried to run the stored procedure on query analyzer, and it works well) Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Description: An unhandled exception occurred...
2
10733
by: carl.rosenberger | last post by:
Hi, I am trying to get the following behaviour for my Socket connection: (1) Attempt a blocked read for a defined amount of time. (2) If a timeout occurs, because no data has been sent to the socket, throw an exception. (3) Catch the exception and either go back to (1) or quit reading, depending on a variety of (user defined) factors.
2
3463
by: shark | last post by:
Hi. I'm dealing with scenario when call to any web method ends up with timeout and I try to add the user a chance to retry (wait a little bit) My service proxy code looks like this: AsyncCallback cb = new AsyncCallback(ServiceCallback); IAsyncResult result1 = BeginInvoke(methodName, parameters, cb, this); if(result1.IsCompleted == false) {
0
8800
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9508
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9350
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9218
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6772
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6060
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4586
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4836
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2765
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.