Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Request timed out error only when running release mode not debug

Reply
Thread Tools

Request timed out error only when running release mode not debug

 
 
TimG
Guest
Posts: n/a
 
      08-27-2007
I have a web service that performs a long running task (typically 10-20
minutes) via an async call. When I run the web service either within the
debugger or with Debug=True it works as expected. When I run it with
Debug=False it gets a HttpException, Request timed out after 5 minutes.

I have tried upping the timeout to 15 minutes (even though MSDN docs say
timeout is for synchronous calls) and the error still happens after 5 minutes.

Any thoughts or hints on what is happening.

--
Thanks,

Tim
 
Reply With Quote
 
 
 
 
John Saunders [MVP]
Guest
Posts: n/a
 
      08-27-2007
"TimG" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have a web service that performs a long running task (typically 10-20
> minutes) via an async call. When I run the web service either within the
> debugger or with Debug=True it works as expected. When I run it with
> Debug=False it gets a HttpException, Request timed out after 5 minutes.
>
> I have tried upping the timeout to 15 minutes (even though MSDN docs say
> timeout is for synchronous calls) and the error still happens after 5
> minutes.
>
> Any thoughts or hints on what is happening.


Which request timed out? A request from a client application? If so, has the
client changed, or is it only the server that has changed, from debug to
non-debug modes?
--
John Saunders [MVP]

 
Reply With Quote
 
 
 
 
TimG
Guest
Posts: n/a
 
      08-28-2007
I don't have the stack trace right now so this is from memory. The timeout
was propagated as a soapexception to the client in something like
GetAsyncResponse (client should be waiting for the server to finish the async
method). The server was not running in either debug mode or within a
debugger, the client was running within the visual studio debugger. There
was no stack trace information supplied with the soapexception, only "Request
timed out".
--
Thanks,

Tim


"John Saunders [MVP]" wrote:

> "TimG" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >I have a web service that performs a long running task (typically 10-20
> > minutes) via an async call. When I run the web service either within the
> > debugger or with Debug=True it works as expected. When I run it with
> > Debug=False it gets a HttpException, Request timed out after 5 minutes.
> >
> > I have tried upping the timeout to 15 minutes (even though MSDN docs say
> > timeout is for synchronous calls) and the error still happens after 5
> > minutes.
> >
> > Any thoughts or hints on what is happening.

>
> Which request timed out? A request from a client application? If so, has the
> client changed, or is it only the server that has changed, from debug to
> non-debug modes?
> --
> John Saunders [MVP]
>
>

 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      08-28-2007
Hi Tim,

For ASP.NET webservice, when you call it from .net client(through
autogenerated proxy class) and the service method have long-run task to
run, you may get timeout error due to the following two causes:

** The ASP.NET runtime has a "executionTime" limitation, by default it is
set to 110 seconds. And this timeout only take effect when running in
release mode.

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


** The .NET webservcie's client proxy class (derived from WebClient

#WebClientProtocol.Timeout Property
http://msdn2.microsoft.com/en-us/lib...rotocols.webcl
ientprotocol.timeout(VS.71).aspx

For your scenario, the error message is more likely due to the server-side
"executionTimeout" setting. You can try enlarge the "executionTimeout"
attribute in the <httpRuntime> element in web.config file to see whether it
helps.

If you have anything unclear, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.



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.



--------------------
>From: =?Utf-8?B?VGltRw==?= <(E-Mail Removed)>
>References: <(E-Mail Removed)>

<#(E-Mail Removed)>
>Subject: Re: Request timed out error only when running release mode not deb
>Date: Mon, 27 Aug 2007 19:50:01 -0700



>I don't have the stack trace right now so this is from memory. The

timeout
>was propagated as a soapexception to the client in something like
>GetAsyncResponse (client should be waiting for the server to finish the

async
>method). The server was not running in either debug mode or within a
>debugger, the client was running within the visual studio debugger. There
>was no stack trace information supplied with the soapexception, only

"Request
>timed out".
>--
>Thanks,
>
>Tim
>
>
>"John Saunders [MVP]" wrote:
>
>> "TimG" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> >I have a web service that performs a long running task (typically 10-20
>> > minutes) via an async call. When I run the web service either within

the
>> > debugger or with Debug=True it works as expected. When I run it with
>> > Debug=False it gets a HttpException, Request timed out after 5 minutes.
>> >
>> > I have tried upping the timeout to 15 minutes (even though MSDN docs

say
>> > timeout is for synchronous calls) and the error still happens after 5
>> > minutes.
>> >
>> > Any thoughts or hints on what is happening.

>>
>> Which request timed out? A request from a client application? If so, has

the
>> client changed, or is it only the server that has changed, from debug to
>> non-debug modes?
>> --
>> John Saunders [MVP]
>>
>>

>


 
Reply With Quote
 
TimG
Guest
Posts: n/a
 
      08-28-2007
Thanks, updating ExecutionTimeout solved my problem.

One more question, is there a way to set this within code so that the
timeout can be very long (up to a day) for a specific call?

--
Thanks,

Tim


"Steven Cheng[MSFT]" wrote:

> Hi Tim,
>
> For ASP.NET webservice, when you call it from .net client(through
> autogenerated proxy class) and the service method have long-run task to
> run, you may get timeout error due to the following two causes:
>
> ** The ASP.NET runtime has a "executionTime" limitation, by default it is
> set to 110 seconds. And this timeout only take effect when running in
> release mode.
>
> #httpRuntime Element (ASP.NET Settings Schema)
> http://msdn2.microsoft.com/en-us/library/e1f13641.aspx
>
>
> ** The .NET webservcie's client proxy class (derived from WebClient
>
> #WebClientProtocol.Timeout Property
> http://msdn2.microsoft.com/en-us/lib...rotocols.webcl
> ientprotocol.timeout(VS.71).aspx
>
> For your scenario, the error message is more likely due to the server-side
> "executionTimeout" setting. You can try enlarge the "executionTimeout"
> attribute in the <httpRuntime> element in web.config file to see whether it
> helps.
>
> If you have anything unclear, please feel free to post here.
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
>
> ==================================================
>
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscripti...ult.aspx#notif
> ications.
>
>
>
> 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.
>
>
>
> --------------------
> >From: =?Utf-8?B?VGltRw==?= <(E-Mail Removed)>
> >References: <(E-Mail Removed)>

> <#(E-Mail Removed)>
> >Subject: Re: Request timed out error only when running release mode not deb
> >Date: Mon, 27 Aug 2007 19:50:01 -0700

>
>
> >I don't have the stack trace right now so this is from memory. The

> timeout
> >was propagated as a soapexception to the client in something like
> >GetAsyncResponse (client should be waiting for the server to finish the

> async
> >method). The server was not running in either debug mode or within a
> >debugger, the client was running within the visual studio debugger. There
> >was no stack trace information supplied with the soapexception, only

> "Request
> >timed out".
> >--
> >Thanks,
> >
> >Tim
> >
> >
> >"John Saunders [MVP]" wrote:
> >
> >> "TimG" <(E-Mail Removed)> wrote in message
> >> news:(E-Mail Removed)...
> >> >I have a web service that performs a long running task (typically 10-20
> >> > minutes) via an async call. When I run the web service either within

> the
> >> > debugger or with Debug=True it works as expected. When I run it with
> >> > Debug=False it gets a HttpException, Request timed out after 5 minutes.
> >> >
> >> > I have tried upping the timeout to 15 minutes (even though MSDN docs

> say
> >> > timeout is for synchronous calls) and the error still happens after 5
> >> > minutes.
> >> >
> >> > Any thoughts or hints on what is happening.
> >>
> >> Which request timed out? A request from a client application? If so, has

> the
> >> client changed, or is it only the server that has changed, from debug to
> >> non-debug modes?
> >> --
> >> John Saunders [MVP]
> >>
> >>

> >

>
>

 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      08-29-2007
Thanks for your reply Tim,

For the <httpRuntime> setting, I'm afraid it must be configured statically
and do not allow runtime/programmatically configuring. However, ASP.NET
web application support a hierarchial configuration model so that you can
specify customized and particular settings(those setting allow configured
in sub directories) for a sub directory(or asmx, aspx page). You can have
a look at the following reference:

#location Element (ASP.NET Settings Schema)
http://msdn2.microsoft.com/en-us/library/b6x6shw7.aspx

#How to: Configure Specific Directories Using Location Settings
http://msdn2.microsoft.com/en-us/lib...92(VS.80).aspx

thus, for your scenario, if possible, you can gather all those webmethods
that will need long-run execution into a single webservice(asmx endpoint)
and put it in a particular sub folder and specify a larege
"executionTimeout" setting for that particular sub dir. How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


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



--------------------

>Xref: TK2MSFTNGHUB02.phx.gbl

microsoft.public.dotnet.framework.aspnet.webservic es:1427
>NNTP-Posting-Host: tk2msftsbfm01.phx.gbl 10.40.244.148
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>
>Thanks, updating ExecutionTimeout solved my problem.
>
>One more question, is there a way to set this within code so that the
>timeout can be very long (up to a day) for a specific call?
>
>--
>Thanks,
>
>Tim
>
>
>"Steven Cheng[MSFT]" wrote:
>
>> Hi Tim,
>>
>> For ASP.NET webservice, when you call it from .net client(through
>> autogenerated proxy class) and the service method have long-run task to
>> run, you may get timeout error due to the following two causes:
>>
>> ** The ASP.NET runtime has a "executionTime" limitation, by default it

is
>> set to 110 seconds. And this timeout only take effect when running in
>> release mode.
>>
>> #httpRuntime Element (ASP.NET Settings Schema)
>> http://msdn2.microsoft.com/en-us/library/e1f13641.aspx
>>
>>
>> ** The .NET webservcie's client proxy class (derived from WebClient
>>
>> #WebClientProtocol.Timeout Property
>>

http://msdn2.microsoft.com/en-us/lib...rotocols.webcl
>> ientprotocol.timeout(VS.71).aspx
>>
>> For your scenario, the error message is more likely due to the

server-side
>> "executionTimeout" setting. You can try enlarge the "executionTimeout"
>> attribute in the <httpRuntime> element in web.config file to see whether

it
>> helps.
>>
>> If you have anything unclear, please feel free to post here.
>>
>> Sincerely,
>>
>> Steven Cheng
>>
>> Microsoft MSDN Online Support Lead
>>
>>
>>
>> ==================================================
>>
>> Get notification to my posts through email? Please refer to
>>

http://msdn.microsoft.com/subscripti...ult.aspx#notif
>> ications.
>>
>>
>>
>> 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.
>>
>>
>>
>> --------------------
>> >From: =?Utf-8?B?VGltRw==?= <(E-Mail Removed)>
>> >References: <(E-Mail Removed)>

>> <#(E-Mail Removed)>
>> >Subject: Re: Request timed out error only when running release mode not

deb
>> >Date: Mon, 27 Aug 2007 19:50:01 -0700

>>
>>
>> >I don't have the stack trace right now so this is from memory. The

>> timeout
>> >was propagated as a soapexception to the client in something like
>> >GetAsyncResponse (client should be waiting for the server to finish the

>> async
>> >method). The server was not running in either debug mode or within a
>> >debugger, the client was running within the visual studio debugger.

There
>> >was no stack trace information supplied with the soapexception, only

>> "Request
>> >timed out".
>> >--
>> >Thanks,
>> >
>> >Tim
>> >
>> >
>> >"John Saunders [MVP]" wrote:
>> >
>> >> "TimG" <(E-Mail Removed)> wrote in message
>> >> news:(E-Mail Removed)...
>> >> >I have a web service that performs a long running task (typically

10-20
>> >> > minutes) via an async call. When I run the web service either

within
>> the
>> >> > debugger or with Debug=True it works as expected. When I run it

with
>> >> > Debug=False it gets a HttpException, Request timed out after 5

minutes.
>> >> >
>> >> > I have tried upping the timeout to 15 minutes (even though MSDN

docs
>> say
>> >> > timeout is for synchronous calls) and the error still happens after

5
>> >> > minutes.
>> >> >
>> >> > Any thoughts or hints on what is happening.
>> >>
>> >> Which request timed out? A request from a client application? If so,

has
>> the
>> >> client changed, or is it only the server that has changed, from debug

to
>> >> non-debug modes?
>> >> --
>> >> John Saunders [MVP]
>> >>
>> >>
>> >

>>
>>

>


 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      09-03-2007
Hi Tim,

Any further question on this? If so, please feel free to let me know.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


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


--------------------
>
>Thanks for your reply Tim,
>
>For the <httpRuntime> setting, I'm afraid it must be configured statically
>and do not allow runtime/programmatically configuring. However, ASP.NET
>web application support a hierarchial configuration model so that you can
>specify customized and particular settings(those setting allow configured
>in sub directories) for a sub directory(or asmx, aspx page). You can have
>a look at the following reference:
>
>#location Element (ASP.NET Settings Schema)
>http://msdn2.microsoft.com/en-us/library/b6x6shw7.aspx
>
>#How to: Configure Specific Directories Using Location Settings
>http://msdn2.microsoft.com/en-us/lib...92(VS.80).aspx
>
>thus, for your scenario, if possible, you can gather all those webmethods
>that will need long-run execution into a single webservice(asmx endpoint)
>and put it in a particular sub folder and specify a larege
>"executionTimeout" setting for that particular sub dir. How do you think?
>
>Sincerely,
>
>Steven Cheng
>
>Microsoft MSDN Online Support Lead
>
>
>This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>
>--------------------
>
>>Xref: TK2MSFTNGHUB02.phx.gbl

>microsoft.public.dotnet.framework.aspnet.webservi ces:1427
>>NNTP-Posting-Host: tk2msftsbfm01.phx.gbl 10.40.244.148
>>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>>
>>Thanks, updating ExecutionTimeout solved my problem.
>>
>>One more question, is there a way to set this within code so that the
>>timeout can be very long (up to a day) for a specific call?
>>
>>--
>>Thanks,
>>
>>Tim
>>
>>
>>"Steven Cheng[MSFT]" wrote:
>>
>>> Hi Tim,
>>>
>>> For ASP.NET webservice, when you call it from .net client(through
>>> autogenerated proxy class) and the service method have long-run task to
>>> run, you may get timeout error due to the following two causes:
>>>
>>> ** The ASP.NET runtime has a "executionTime" limitation, by default it

>is
>>> set to 110 seconds. And this timeout only take effect when running in
>>> release mode.
>>>
>>> #httpRuntime Element (ASP.NET Settings Schema)
>>> http://msdn2.microsoft.com/en-us/library/e1f13641.aspx
>>>
>>>
>>> ** The .NET webservcie's client proxy class (derived from WebClient
>>>
>>> #WebClientProtocol.Timeout Property
>>>

>http://msdn2.microsoft.com/en-us/lib...protocols.webc

l
>>> ientprotocol.timeout(VS.71).aspx
>>>
>>> For your scenario, the error message is more likely due to the

>server-side
>>> "executionTimeout" setting. You can try enlarge the "executionTimeout"
>>> attribute in the <httpRuntime> element in web.config file to see

whether
>it
>>> helps.
>>>
>>> If you have anything unclear, please feel free to post here.
>>>
>>> Sincerely,
>>>
>>> Steven Cheng
>>>
>>> Microsoft MSDN Online Support Lead
>>>
>>>
>>>
>>> ==================================================
>>>
>>> Get notification to my posts through email? Please refer to
>>>

>http://msdn.microsoft.com/subscripti...ault.aspx#noti

f
>>> ications.
>>>
>>>
>>>
>>> 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.
>>>
>>>
>>>
>>> --------------------
>>> >From: =?Utf-8?B?VGltRw==?= <(E-Mail Removed)>
>>> >References: <(E-Mail Removed)>
>>> <#(E-Mail Removed)>
>>> >Subject: Re: Request timed out error only when running release mode

not
>deb
>>> >Date: Mon, 27 Aug 2007 19:50:01 -0700
>>>
>>>
>>> >I don't have the stack trace right now so this is from memory. The
>>> timeout
>>> >was propagated as a soapexception to the client in something like
>>> >GetAsyncResponse (client should be waiting for the server to finish

the
>>> async
>>> >method). The server was not running in either debug mode or within a
>>> >debugger, the client was running within the visual studio debugger.

>There
>>> >was no stack trace information supplied with the soapexception, only
>>> "Request
>>> >timed out".
>>> >--
>>> >Thanks,
>>> >
>>> >Tim
>>> >
>>> >
>>> >"John Saunders [MVP]" wrote:
>>> >
>>> >> "TimG" <(E-Mail Removed)> wrote in message
>>> >> news:(E-Mail Removed)...
>>> >> >I have a web service that performs a long running task (typically

>10-20
>>> >> > minutes) via an async call. When I run the web service either

>within
>>> the
>>> >> > debugger or with Debug=True it works as expected. When I run it

>with
>>> >> > Debug=False it gets a HttpException, Request timed out after 5

>minutes.
>>> >> >
>>> >> > I have tried upping the timeout to 15 minutes (even though MSDN

>docs
>>> say
>>> >> > timeout is for synchronous calls) and the error still happens

after
>5
>>> >> > minutes.
>>> >> >
>>> >> > Any thoughts or hints on what is happening.
>>> >>
>>> >> Which request timed out? A request from a client application? If so,

>has
>>> the
>>> >> client changed, or is it only the server that has changed, from

debug
>to
>>> >> non-debug modes?
>>> >> --
>>> >> John Saunders [MVP]
>>> >>
>>> >>
>>> >
>>>
>>>

>>

>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Abort an HTTP request before the request timed out Gelonida N Python 0 02-27-2012 02:22 AM
User Control access fails in debug mode, works in release mode rbg ASP .Net 0 01-17-2007 10:51 PM
Response.Redirect is slooow in debug mode, ok in release mode =?Utf-8?B?TWF4?= ASP .Net 0 02-11-2006 12:37 AM
Debug mode dll's vs release mode dll's? Dave ASP .Net 0 02-20-2004 03:49 AM
System.Web.HttpException: Request timed out - [HttpException (0x80004005): Request timed out.] Steve ASP .Net 0 07-01-2003 12:11 AM



Advertisments