Groups | Blog | Home
all groups > asp.net webservices > february 2008 >

asp.net webservices : Webservice drops multithread application


Mr. Murdock
2/26/2008 2:19:02 AM
Hello,

I have a multithread method that calls a really long SP. It takes around 2
hours to run. this method is in a Webservice. I'm using Thread object to
control the multithread procedure and each thread creates it own data
connection to avoid connection already open exception.

It starts OK, runs for sometime and just drops. I have created a log
procedure to trace it and it looks like .NET is dropping the thread together
with the data connection.

I tried with other SPs and works fine but for this long one it doesn't.

Should I remove the Thread object and call the async webservice method
instead?
Could this be some kind of timeout?

Mr. Murdock
2/26/2008 5:11:00 AM
I have tried increasing the webservice object timeout and execution timeout
(debug ='false') but It didn't work.

I don't receive any error messages.

[quoted text, click to view]
John Saunders [MVP]
2/26/2008 12:59:13 PM
[quoted text, click to view]

What is it that led you to believe that the thread is "just dropped"?

Also, web services are not appropriate for running any long-running task.
You should be using something like a Windows Service to run such a task,
perhaps triggered by the web service.
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer

Mr. Murdock
3/3/2008 7:38:01 AM
Hello there,

IIS was running under a policy to remove threads on idle for longer than 20
mins.
I just has to create a new application pool without that rule.
Sorted.

Thanks

[quoted text, click to view]
AddThis Social Bookmark Button