473,666 Members | 2,093 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SqlException: Timeout expired

Hi,
I have an unusual error,

"System.Data.Sq lClient.SqlExce ption: Timeout expired. The timeout period
elapsed prior to completion of the operation or the server is not
responding..... .and so on "
I have never seen such an error.

Yes, i do agree that the SP takes anywhere b/w 2-5 min to return data and i
have no "connection timeout parameter" set in my web.config
the thing which baffles me is that this exception is thrown at about 1 min
range

please advice,
Stephen
Nov 19 '05 #1
4 1873
Is this not a command timeout opposed to a connection timeout?

There is a timeout on the command object that you can set.
"Stephen Noronha" <st********@hot mail.com> wrote in message
news:u6******** ******@TK2MSFTN GP09.phx.gbl...
Hi,
I have an unusual error,

"System.Data.Sq lClient.SqlExce ption: Timeout expired. The timeout period
elapsed prior to completion of the operation or the server is not
responding..... .and so on "
I have never seen such an error.

Yes, i do agree that the SP takes anywhere b/w 2-5 min to return data and i have no "connection timeout parameter" set in my web.config
the thing which baffles me is that this exception is thrown at about 1 min
range

please advice,
Stephen

Nov 19 '05 #2
Hi Landley,

here is what I am doing?
Private function GetRecords(ByVa l startDate As Date, ByVal endDate As Date,
ByVal Code1 As String, ByVal Code2 As String) As DataTable
Dim cmd As New SqlCommand("stp _GetRecords", conn)
cmd.CommandType = CommandType.Sto redProcedure
Dim da As New SqlDataAdapter( cmd)
Dim dt As New DataTable
Try
Dim pms As SqlParameterCol lection = cmd.Parameters
pms.Add("@begda te", SqlDbType.Small DateTime).Value = startDate
pms.Add("@endda te", SqlDbType.Small DateTime).Value = endDate
pms.Add("@code1 ", SqlDbType.VarCh ar, 6).Value = Code1
pms.Add("@code2 ", SqlDbType.VarCh ar, 6).Value = Code2

da.Fill(dt) <---- Fails here

If dt.Rows.Count > 0 Then
GetRecords = dt

Else
GetRecords = Nothing

End If

Catch ex As Exception
'Throw New Exception
lblError.Text = ex.ToString

End Try
Return GetRecords

End Function

It gives me a timeout error while its filling the datatable,
Please advice,
Stephen
Nov 19 '05 #3
Stephen,
I think your SP is timing out because of the remote conection
timeout set on your database server. Try the following steps in your
SQLServer.

1)In Object Explorer, right-click a server and select Properties.

2)Click the Connections node.

3)Under Remote server connections, in the Remote query timeout box,
type or select a value from 0 through 2,147,483,647 to set the maximum
number seconds for SQL Server to wait before timing out.

Hope this helps......

Regards,
Pavan.

Nov 19 '05 #4
SqlCommand has a 1 minute timeout by default. set it higher. you will then
have to bump up the page timeout. though 2-3 minutes is way too long, the
broser/proxy may give up. certainty the user will.

-- bruce (sqlwork.com)
"Stephen Noronha" <st********@hot mail.com> wrote in message
news:u6******** ******@TK2MSFTN GP09.phx.gbl...
Hi,
I have an unusual error,

"System.Data.Sq lClient.SqlExce ption: Timeout expired. The timeout period
elapsed prior to completion of the operation or the server is not
responding..... .and so on "
I have never seen such an error.

Yes, i do agree that the SP takes anywhere b/w 2-5 min to return data and
i
have no "connection timeout parameter" set in my web.config
the thing which baffles me is that this exception is thrown at about 1 min
range

please advice,
Stephen

Nov 19 '05 #5

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

Similar topics

0
1784
by: Silvia | last post by:
I have a application web and when execute this for a long time generated this error: Server Error in '/RAIMServer' Application. ----------------------------------------------------------- --------------------- Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and
4
17985
by: hb | last post by:
Hi, I got the "System.Data.SqlClient.SqlException: Timeout expired. " error on my web application while saving some data. Would you please tell me how to change the settings in SQL Server 2000 or IIS to increase the timeout?
4
4906
by: Nick | last post by:
Hi I am a little stuck. I have a web app which uses cookieless session management. I would like to inform a user when their session has ended but cannot work out how to implement. I thought of placing a redirect into the Session_End method in the global file but this does not work. To my understanding a session will end when it has been idle for the time specified in the web.config file. The user may still have the
4
4376
by: Nevyn Twyll | last post by:
I've been working on an asp.net application and everything's been great. But suddenly, whether I'm tyring to use a database on my own machine, or on my server, I'm getting a timeout when trying to open a database connection. The error seems to happen regardless of what ASP.NET app I'm working with/trying to debug. It will open a few connections, Here's the error:
3
16047
by: Matt | last post by:
I'm having an issue with returning a large amount of data into a dataset. When the query returns thousands of lines of data (in Query Analyzer it can take 2 minutes) I receive the following error: Message: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding....
0
4094
by: Ersin Gençtürk | last post by:
we are getting : System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) at...
0
2028
by: bonita | last post by:
If I add the code for user to download the file (e.g. if(File.Exists(FILE_NAME)){......}), the ASP.NET will give the following timeout error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. It seems that the download file code is executing before letting the previous code to finish. Even the message print code (message.Text="...";) is not executed.
14
7027
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that sql server resides on is not reachable. The error is different depending on the connection string that I use. If I use the following connection string: "server=192.1.1.1; Initial Catalog=master; uid=The_User; password=The_Password; Connect...
3
2231
by: rn5a | last post by:
I am working on Win2K Pro (SP4) with P4 2.80GHz, 256MB RAM & 20GB hard disk (IIS5.0). I use Visual Web Developer 2005 Express Edition to create & edit ASP.NET apps. Whenever I log in to my m/c. & run any ASPX page in IE6.0 for the very first time, I always get the following timeout expired error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
0
8444
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8356
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
8869
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
8781
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
7386
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
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
5664
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
4198
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...
1
2771
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.