473,761 Members | 8,651 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Set application timeout to more than 3 minutes

I have a custom VB.net application that runs a query against an SQL
server that takes more than 3 minutes. Right now after 3 minutes it
times out. So far after doing my research I have changed the following:

in web.config:
<system.web>

<httpRuntime executionTimeou t="1000" maxRequestLengt h="2000000"/>
<sessionState
mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424"
sqlConnectionSt ring="data
source=127.0.0. 1;Trusted_Conne ction=yes"
cookieless="fal se"
timeout="600"/>

In the page itself:

Me.SqlConnectio n1.ConnectionSt ring = "workstatio n id=OBANG;packet
size=4096;user id=sa;data source=OBANG;pe rsist securi" & _
"ty info=False;init ial catalog=YZA; Connect Timeout=600 "
Me.SqlSelectCom mand1.CommandTi meout = 600
The page still times out after 3 min. Is there anything that I am
missing?

Thanks in advance.

Jan 2 '07 #1
7 9945
dadocsis wrote:
I have a custom VB.net application that runs a query against an SQL
server that takes more than 3 minutes. Right now after 3 minutes it
times out. So far after doing my research I have changed the following:

in web.config:
<system.web>

<httpRuntime executionTimeou t="1000" maxRequestLengt h="2000000"/>
<sessionState
mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424"
sqlConnectionSt ring="data
source=127.0.0. 1;Trusted_Conne ction=yes"
cookieless="fal se"
timeout="600"/>

In the page itself:

Me.SqlConnectio n1.ConnectionSt ring = "workstatio n id=OBANG;packet
size=4096;user id=sa;data source=OBANG;pe rsist securi" & _
"ty info=False;init ial catalog=YZA; Connect Timeout=600 "
Me.SqlSelectCom mand1.CommandTi meout = 600
The page still times out after 3 min. Is there anything that I am
missing?

Thanks in advance.
If memory serves me right, there is a connection timeout setting in
mssql thats in seconds; What is yours set to?

Joe (MCAD)
Jan 3 '07 #2
Hi,

Would you please post the detailed exception when the page times out? Try
to visit it on localhost so that you can see the detailed exception.

I think this might not be related to the sql query's time out settings.
Anyway, let's see the exception first.

Sincerely,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Jan 3 '07 #3
Sorry it took me so long to write back. Yesterday was hectic.

I didnt mention that I already set the SQL server query timeout to 600
sec.

Here is the detailed exception:

Server Error in '/YZA_Remote' Application.
--------------------------------------------------------------------------------

Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Data.Sql Client.SqlExcep tion: Timeout expired.
The timeout period elapsed prior to completion of the operation or the
server is not responding.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException: Timeout expired. The timeout period elapsed prior to
completion of the operation or the server is not responding.]
System.Data.Sql Client.SqlComma nd.ExecuteReade r(CommandBehavi or
cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +742
System.Data.Sql Client.SqlComma nd.ExecuteReade r(CommandBehavi or
behavior) +45

System.Data.Sql Client.SqlComma nd.System.Data. IDbCommand.Exec uteReader(Comma ndBehavior
behavior) +5
System.Data.Com mon.DbDataAdapt er.FillFromComm and(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Com mon.DbDataAdapt er.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +77
System.Data.Com mon.DbDataAdapt er.Fill(DataSet dataSet) +38
YZA_Remote.Orde rControl.InitGr idData() +8219
YZA_Remote.Orde rControl.btnFet chNewData_Click (Object sender,
EventArgs e) +49
System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e) +108

System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring
eventArgument) +57
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData)
+33
System.Web.UI.P age.ProcessRequ estMain() +1273

Walter Wang [MSFT] wrote:
Hi,

Would you please post the detailed exception when the page times out? Try
to visit it on localhost so that you can see the detailed exception.

I think this might not be related to the sql query's time out settings.
Anyway, let's see the exception first.

Sincerely,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.
Jan 4 '07 #4
Hi,

Hope you're better now.

For page execution time out setting, it's only effective in Release mode:

#httpRuntime Element (ASP.NET Settings Schema)
http://msdn2.microsoft.com/en-us/library/e1f13641.aspx
executionTimeou t Optional TimeSpan attribute.

Specifies the maximum number of seconds that a request is allowed to
execute before being automatically shut down by ASP.NET.

This time-out applies only if the debug attribute in the compilation
element is False. To help to prevent shutting down the application while
you are debugging, do not set this time-out to a large value.

The default is "00:01:50" (110 seconds).Note

In the .NET Framework 1.0 and 1.1, the default is 90.
#############
From the exception and stack trace, it seems related to ADO.NET query timed
out. To confirm this issue is not related to ASP.NET, try to issue the
query in a WinForm or Console application. Normally you only need to set
the connection time out in the connection string and you set the command
time out in CommandTimeOut property. This should work as expected. Anyway,
let's first narrow down the issue to see if it's related to ASP.NET or not.
Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.
Jan 5 '07 #5
Thanks 4 the response. Can I run the query in "Query analyzer?"

Walter Wang [MSFT] wrote:
Hi,

Hope you're better now.

For page execution time out setting, it's only effective in Release mode:

#httpRuntime Element (ASP.NET Settings Schema)
http://msdn2.microsoft.com/en-us/library/e1f13641.aspx
executionTimeou t Optional TimeSpan attribute.

Specifies the maximum number of seconds that a request is allowed to
execute before being automatically shut down by ASP.NET.

This time-out applies only if the debug attribute in the compilation
element is False. To help to prevent shutting down the application while
you are debugging, do not set this time-out to a large value.

The default is "00:01:50" (110 seconds).Note

In the .NET Framework 1.0 and 1.1, the default is 90.
#############
From the exception and stack trace, it seems related to ADO.NET query timed
out. To confirm this issue is not related to ASP.NET, try to issue the
query in a WinForm or Console application. Normally you only need to set
the connection time out in the connection string and you set the command
time out in CommandTimeOut property. This should work as expected. Anyway,
let's first narrow down the issue to see if it's related to ASP.NET or not.
Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.
Jan 5 '07 #6
I suggest create a simple Console application and use the same database
access code in your web application to test it, this way we could know if
it's related to ASP.NET or not.
Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Jan 5 '07 #7

Walter Wang [MSFT] wrote:
I suggest create a simple Console application and use the same database
access code in your web application to test it, this way we could know if
it's related to ASP.NET or not.
Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.
Walter Sorry for the delayed response again. I am going to have to hold
off on this for a little while. I am not a programmer I just have a
little light programming experience with VB based languages. The
program was initially created by an experienced coder and due to $ my
company doesnt want to hire him again to fix this problem so this is
why I am stuck with it. The query comes from a complex stored
proceedure that is like 10 pages long! It will take me some time to
build a Console app. so I will have to hold off on this when I am not
so busy. Thanks for your time.

Jan 11 '07 #8

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

Similar topics

9
2625
by: E Sullivan | last post by:
I am having a time out issue when multiple users are accessing the server. This time out does not happen all of the time. My understanding is that the time out value is actually set in two places. I believe one is in the asp pages for the session itself, and the other is more of a system timeout settting in IIS. Would one of these supercede the other if the two are different? I have already looked at the time out setting in IIS, and it...
3
2039
by: Jeff Greenland | last post by:
Hello everyone, I am having problems with Timers in a web application. They just seem to stop running after 15 minutes or so. My web application is set up like this: When a user hits a page in the site, that page (.aspx) instantiates a compiled class (.DLL). The instantiation process creates a Timer that runs in the background to perform tasks every so often (such as notifying clients
4
15468
by: DavidS | last post by:
First: There are several ways to confuse one regarding session timeout. (1) web.config - <sessionState timeout="20"> (2) IIS Manager | Internet Information Services | ServerNode | Default Web Site | Properties | Configuration | Options | Enable Session State Session timeout 20 (3) within Global.asax.vb file - Session_Start subroutine can use Session.Timeout=x minutes or (4) within any web page, i.e., <web page>.aspx can use...
1
1935
by: Jeremy S. | last post by:
In application pools there are two property settings (amongst others): 1. Recycle Worker Process (in minutes) 2. Idle Timeout - shut down worker process after being idle for (in minutes). My question: IF the Idle Timeout value is reached BEFORE the Recycle minutes are reached, then will the worker process effectively recycle? More specifically, if the Recycle Worker Process (in minutes) is set to 100 minutes AND the Idle Timeout is...
0
1283
by: Phinneas | last post by:
Howdy, I have multiple apps running on a pair of dual-processor Win2k IIS servers, neither of which are domain controllers. My users are experiencing fairly frequent (10-20 / day) "Server Application Unavailable" errors. I'm using a custom "Server Application Unavailable" page to send me an email whenever this occurs. I also have a ProcessHistory page that leverages ProcessModelInfo.GetHistory() to show me what's going on at the...
6
1499
by: Chase | last post by:
I'm pretty new to asp.net and am having problems with my application timing out. I've written an application that loops through all of the information on an excel spreadsheet and does certain things with it, like creating and configuring WSS sites. My application runs fine for approximately 25 minutes, then I get the 'Page cannot be displayed' error. It seems like my browser times out before the application can finish what its doing.
6
2042
by: Mad Scientist Jr | last post by:
My asp.net pages sessions are timing out after 20 minutes, and when I asked my Web host about it they said due to the nature of a shared hosting environment they cannot allow for sessions to keep application pools and worker processes hosed for too long as these fearures are consuming CPU resources while they are active. Therefore the pool application shutdown and re-start settings are at 20 minutes. Is there a workaround for this? Do I...
10
2673
by: Atul Shukla | last post by:
Hi, How can I avoid application timeout? Generally a web application time out is 20 minutes, however, we can define this timeout in web.config to any number of minutes. After giving 500 minutes of time out which is about little more than 8 hours, the page expires in less than 2 hours. I am confused here how to avoid this timeout problem. I just dont want my page to be expired, should work similar to windows application. Possible?
9
19654
by: antonyliu2002 | last post by:
By default, IIS is configured to timeout a session in 20 minutes, which can be changed through the IIS config window. I use InProc sessionState mode. I can also set the session timeout in web.config. So here is my question: If IIS setting has a session timeout value of 20 minutes, but my web.config setting has a session timeout of 30 minutes, will the session time out in 20 minutes or in 30 minutes?
0
9531
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
9345
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
10115
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...
1
9905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7332
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
5229
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
5373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3881
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
3
2752
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.