473,569 Members | 2,652 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Timeout expired

41 New Member
My ASP page is calling a Stored Procedure,it will take around 70 to 100 seconds to execute.I am getting timeout error in my ASP page.

I already put
Server.ScriptTi meout = 3600

Microsoft OLE DB Provider for SQL Server (0x80040E31)
Timeout expired

Please Advice....

Thanks
Aug 15 '07 #1
4 22420
ilearneditonline
130 Recognized Expert New Member
My ASP page is calling a Stored Procedure,it will take around 70 to 100 seconds to execute.I am getting timeout error in my ASP page.

I already put
Server.ScriptTi meout = 3600

Microsoft OLE DB Provider for SQL Server (0x80040E31)
Timeout expired

Please Advice....

Thanks
The problem is that the connection to the SQL server is timing out, not the script. You need to define a timeout on your command or maybe your connection.

Expand|Select|Wrap|Line Numbers
  1. Dim conn
  2. Set conn = Server.CreateObject("ADODB.Connection")
  3. conn.ConnectionString = "Your ConnectionString"
  4. conn.ConnectionTimeout = 120 'number of seconds
Or if you are using a command object

Expand|Select|Wrap|Line Numbers
  1. Dim cmd
  2. Set cmd = Server.CreateObject("ADODB.Command")
  3. cmd.CommandTimeout = 120 ' number of seconds
Aug 15 '07 #2
CalBob
2 New Member
My ASP page is calling a Stored Procedure,it will take around 70 to 100 seconds to execute.I am getting timeout error in my ASP page.

I already put
Server.ScriptTi meout = 3600

Microsoft OLE DB Provider for SQL Server (0x80040E31)
Timeout expired

Please Advice....

Thanks
In calling your stored procedure set the CommandTimeout = (and the number of seconds you need such as 120)
Aug 17 '07 #3
jhardman
3,406 Recognized Expert Specialist
Although I have on occasion timed out on long procedures (emailing in particular) I am much more likely to time out when a loop isn't advancing. I have noticed that this happens in even fairly well-formed code when an error causes the loop to not advance but I have included an error handler which keeps the script executing. I don't know if this will help...

Jared
Aug 17 '07 #4
ilearneditonline
130 Recognized Expert New Member
In calling your stored procedure set the CommandTimeout = (and the number of seconds you need such as 120)
server.scriptti meout has no effect on the stored procedure. that is how long before a script on the page times out. If you have a stored procedure you know takes 70-100 seconds to timeout, you need to make sure that your command object to the database doesn't timeout before the sp can finish.
Aug 18 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1776
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...
5
13259
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.
2
4567
by: Chris Langston | last post by:
I have a Web Server running IIS 5 or 6 on Windows 2K and Windows 2003 Server that is experiencing strange shutdown problems. We are using ASP.NET v1.1 and our application is written in VB.NET Here's the scenario: 1. .NET Windows Client on a remote machine makes a web service call to update tables on a Web Server running SQL Server...
4
4899
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...
3
13963
by: Nils Magnus Englund | last post by:
Hi, I've made a HttpModule which deals with user authentication. On the first request in a users session, it fetches data from a SQL Server using the following code: using (SqlConnection connection = new SqlConnection(ConfigurationSettings.AppSettings)) {
4
13162
by: VB Programmer | last post by:
When I run my ASP.NET 2.0 web app on my dev machine it works perfect. When I precomile it to my web deployment project and then copy the debug files to my web server I get this problem when trying to login (obviously it's using ASPNETDB.mdf). Any ideas? Server Error in '/' Application....
0
2024
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...
1
45155
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...
3
2229
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...
1
5159
by: Scorpion657 | last post by:
Hey I really need help. I have a Website coded using ASP.NET and VB and for some reason, i'm getting the following error when I try to upload or access a large file which is stored in the database. It was working fine when I was runing the site on the localhost. I added the following line to the web.config file to increase the timeout: ...
0
7700
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...
0
7614
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...
0
8125
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...
0
7974
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...
0
6284
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...
1
5513
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...
0
5219
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...
1
2114
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
0
938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.