Re: WebService method timing out after exactly 3:00 hours

"Ainsley, Robert, ISD" <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.web
Message-ID <[email protected]>
I'm replying to both Adwait and Shawn because Shawn's reply did not
reach me.
 

> -----Original Message-----
> From: Discussion of building .NET applications targeted for 
> the Web [mailto:[email protected]] On Behalf Of 
> Adwait Ullal
> Sent: Wednesday, May 16, 2007 4:26 PM
> To: [email protected]
> Subject: Re: [DOTNET-WEB] WebService method timing out after 
> exactly 3:00 hours
> 
> Perhaps asnyc mode or BizTalk would be of help?
> 

It times out after 3 hours when I run it in async mode. When the user
triggers an update from the web app the method is invoked async. When
the console app processes the scenarios, it's done in sync mode so the
console app can log any failures and avoid overloading SQL Server with
multiple scenarios running at once.

Bob

> - Adwait
> 
> --
> Adwait Ullal
> 
> e: mailto:[email protected]
> w: http://www.adwait.com
> l: http://www.linkedin.com/in/adwait
> j: http://finance.groups.yahoo.com/group/AdwaitsDotNetJobs
> 
> On 5/16/07, Shawn Wildermuth (MVP) 
> <[email protected]> wrote:
> >
> > Ummmm....to ask the obvious question, why do you have a webservice 
> > that runs over 3 hours?

Because the users like the tool so much that they are using it to do
things they never dreamed of doing before, resulting in a sudden
quadrupling overnight of the amount of data that must be processed. It's
actually a result of upper management needing to evaluate a new business
model as a result of a merger.

The method in question is invoked from a web app on demand during the
day by the users and automatically at night by a console app, after the
database has been refreshed with new data. It implements 'What if?'
functionality so the users will define various scenarios and the method
is invoked for each scenario. After the database has been refreshed each
night with new data, the console application is run to update the
results for each scenario prior to the users arrival in the morning. It
takes so much time because it involves slicing and dicing a lot of data
on a SQL Server that has 12GB RAM and 4 dual core processors.

Given these new data volumes, a better solution would involve
MessageQueue and a Windows Service that creates worker processes to
process the items in the queue, but the original business requirements
didn't justify such a solution.

The bottom line is that I need to find out what is causing the 3 hour
limit and get around it until we can come up with a long term solution
to this increased volume.

Bob








> >
> > Thanks,
> >
> > Shawn Wildermuth
> > http://adoguy.com
> > http://wildermuthconsulting.com
> > Microsoft MVP (C#), MCSD.NET, Author and Speaker
> >
> >
> > -----Original Message-----
> > From: Discussion of building .NET applications targeted for the Web 
> > [mailto:[email protected]] On Behalf Of 
> Ainsley, Robert, 
> > ISD
> > Sent: Wednesday, May 16, 2007 5:07 PM
> > To: [email protected]
> > Subject: [DOTNET-WEB] WebService method timing out after 
> exactly 3:00 
> > hours
> >
> > I've got a console application that invokes a synchronous 
> webservice 
> > method multiple times. Whenever the method takes more than 
> 3 hours to 
> > execute, the console application dies with the following error:
> >
> > The request failed with the error message:
> > --
> > Request timed out.
> > Server Error in '/SPAExecuteEngine' Application.
> > Request timed out.
> >
> > 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.Web.HttpException: Request timed out.
> >
> > 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:
> >
> > HttpException (0x80004005): Request timed out.
> >
> > Version Information:
> > Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
> > Version:2.0.50727.42
> >
> > [HttpException]: Request timed out.
> >   at SecuritizationUpdate.MainModule.Main() in 
> > C:SecuritizationUpdate\MainModule.vb:line 74
> >
> > =======================================================
> >
> >
> > The error log entry for the web service is:
> >
> > Event Type:     Error
> > Event Source:   XXX
> > Event Category: None
> > Event ID:       0
> > Date:           5/16/2007
> > Time:           2:37:01 PM
> > User:           N/A
> > Computer:       XXX
> > Description:
> >
> > General Information
> > *********************************************
> > Additional Info:
> > ExceptionManager.MachineName: XXX
> > ExceptionManager.TimeStamp: 5/16/2007 2:37:01 PM
> > ExceptionManager.FullName:
> > Microsoft.ApplicationBlocks.ExceptionManagement, 
> > Version=1.0.1522.17033, Culture=neutral, PublicKeyToken=null
> > ExceptionManager.AppDomainName:
> > /LM/W3SVC/10/Root/SPAExecuteEngine-1-128237812591142484
> > ExceptionManager.ThreadIdentity: NT AUTHORITY\NETWORK SERVICE
> > ExceptionManager.WindowsIdentity: XXX
> >
> > 1) Exception Information
> > *********************************************
> > Exception Type: System.Exception
> > Message: Error Executing Securitization Id 24.
> > Data: System.Collections.ListDictionaryInternal
> > TargetSite: NULL
> > HelpLink: NULL
> > Source: NULL
> >
> > 2) Exception Information
> > *********************************************
> > Exception Type: System.Threading.ThreadAbortException
> > ExceptionState: System.Web.HttpApplication+CancelModuleException
> > Message: Thread was being aborted.
> > Data: System.Collections.ListDictionaryInternal
> > TargetSite: Void Update(System.Data.SqlClient.SqlTransaction)
> > HelpLink: NULL
> > Source: XXX
> >
> > StackTrace Information
> > *********************************************
> > <Deleted for security.>
> >
> >
> > ==================================================================
> >
> > The webservice .Timeout parameter in the console 
> application is set to 
> > 36,000,000 milliseconds, which should be 10 hours.
> >
> > In the webservice web.config, httpRuntime 
> executionTimeout="10800", is 
> > three hours. Thinking that might be it, I set it to 1 
> second and ran 
> > iisreset. I invoked the method with data that should take 
> 20 seconds 
> > to run. It ran to completion without any error in 
> approximately 20 seconds.
> >
> > I also invoked the method asynchronously with .BeginMethod and 
> > Nothing/null for the callback parameters. The webservice 
> method died 
> > at exactly 3 hours with the same ThreadAbortException as above.
> >
> > Is httpRuntime executionTimeout="10800" really the source of my 
> > problem and I messed up trying to change the setting?
> >
> > Is there some other setting I'm missing that I need to change?
> >
> > Is there a 3 hour limit hard-coded somewhere that I can't change?
> >
> > Thanks!
> >
> >
> >
> >
> > 
> **********************************************************************
> > ******
> > *
> > If you are not the intended recipient of this e-mail, please notify 
> > the sender immediately. The contents of this e-mail do not 
> amend any 
> > existing disclosures or agreements unless expressly stated.
> >
> > 
> **********************************************************************
> > ******
> > *
> >
> > ===================================
> > This list is hosted by DevelopMentor.  http://www.develop.com
> >
> > View archives and manage your subscription(s) at 
> > http://discuss.develop.com
> >
> > ===================================
> > This list is hosted by DevelopMentor(r)  http://www.develop.com
> >
> > View archives and manage your subscription(s) at 
> > http://discuss.develop.com
> >
> 
> ===================================
> This list is hosted by DevelopMentor(r)  http://www.develop.com
> 
> View archives and manage your subscription(s) at 
> http://discuss.develop.com
> 

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.