Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / September 2006

Tip: Looking for answers? Try searching our database.

WSE 3 + Long Running Request = Timeout

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
James Hancock - 05 Sep 2006 01:26 GMT
I have a request that could take up to 5-10 minutes to process on the server
side. There's no way around it, and believe me if there was a way to avoid
this, I would be very happy indeed, but there isn't. (and normally this will
take a couple of seconds but if the person hasn't used the web service in
quite a while it could take a very long while (data base size related)).

Anyhow, when I run the request it runs for about 5 mintues and then times
out on the client side. It appears to still be running on the server side,
at least the wp3 process is still going nuts like it's doing it's work.

On start of the Service when I create it I set the Timeout = Int32.MaxValue.

I've tried -1 and it doesn't matter. 0 just errors.

I've set on the server side the HTTP requestTimeout = 3600 (1 hour) and it
doesn't matter.

How do I get the client to wait longer before timing out? (I get the "server
focibly closed the connection..." as the internal error and it's on the
reponse that it's erroring which leads me to believe that it's something in
my config on the server not the client, but...)

Thanks!

James Hancock
Pablo Cibraro [MVP] - 05 Sep 2006 16:02 GMT
Hi James,

Did you use the <serviceProxy class>.Timeout property to set a higher
timeout ?.

<serviceProxy class> is the name of your service proxy class.

Regards,
Pablo Cibraro.

>I have a request that could take up to 5-10 minutes to process on the
>server side. There's no way around it, and believe me if there was a way to
[quoted text clipped - 23 lines]
>
> James Hancock
James Hancock - 05 Sep 2006 16:43 GMT
How do I do that? (I feel stupid now...)

BTW, I should mention that I'm using SecureConversation as well.

Thanks for your help!

James Hancock

> Hi James,
>
[quoted text clipped - 34 lines]
>>
>> James Hancock
Pablo Cibraro [MVP] - 05 Sep 2006 18:12 GMT
The proxy class automatically generated  by VS or the wsewsdl3.exe tool has
a property "Timeout". You can use it to set a higher timeout.

Regards,
Pablo.

> How do I do that? (I feel stupid now...)
>
[quoted text clipped - 42 lines]
>>>
>>> James Hancock
James Hancock - 06 Sep 2006 01:10 GMT
Ok, I've definately set that (int32.maxvalue and tried -1) and it still is
timing out on receive. Any other ideas?

> The proxy class automatically generated  by VS or the wsewsdl3.exe tool
> has a property "Timeout". You can use it to set a higher timeout.
[quoted text clipped - 48 lines]
>>>>
>>>> James Hancock
James Hancock - 06 Sep 2006 16:34 GMT
BTW, I should mention that this appears to only happen on Windows 2003
servers.

> Ok, I've definately set that (int32.maxvalue and tried -1) and it still is
> timing out on receive. Any other ideas?
[quoted text clipped - 51 lines]
>>>>>
>>>>> James Hancock
James Hancock - 08 Sep 2006 14:29 GMT
*PING*
Anyone have any ideas?

Only happens on Windows 2k3 servers too..

>I have a request that could take up to 5-10 minutes to process on the
>server side. There's no way around it, and believe me if there was a way to
[quoted text clipped - 23 lines]
>
> James Hancock
Tim_Mac - 11 Sep 2006 19:15 GMT
hi James,
this may not be the answer your looking for but it is quite a fundamental
problem you face so some lateral thinking may be in order.

how about you make the users aware of the fact that they may have to wait up
to 10 minutes if they haven't logged in for a long time.  here is what i
might do:

run the web method synchronously as normal, but the server starts the
processing on a new thread and returns a GUID corresponding to the job ID
for the client.   you could maintain the list of current jobs in a static
hashtable on the server (or thread pool or backgroundworker objects etc) and
remove them from the list when they are complete.  you could also store
error / status information in the hashtable.  the server might even be able
to estimate how long the job will take based on whatever is in the database,
and then you could return this information with the initial web method call
to the client.

your client invokes the web method, get the job ID back straight away, and
then polls the server at intervals with the job ID until it is complete.
it sounds like the timeout problem is on the client side rather than the
server side so this approach should overcome that.  i hope this suggestion
helps.

tim mackey.

> *PING*
> Anyone have any ideas?
[quoted text clipped - 29 lines]
>>
>> James Hancock
Robert Weber - 13 Sep 2006 15:20 GMT
Hello James,

you may try to set another setting in you web.config (or machine.config)
file: <executionTimeout> below the <httpRuntime> element. You can set the
maximum number of seconds your request processing is allowed to run on the
server. As your problem is related to long execution time on the server this
may be an answer.

Robert

> I have a request that could take up to 5-10 minutes to process on the server
> side. There's no way around it, and believe me if there was a way to avoid
[quoted text clipped - 21 lines]
>
> James Hancock

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.