Webservice drops multithread application

M

Mr. Murdock

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?

Thank you
 
M

Mr. Murdock

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.
 
J

John Saunders [MVP]

Mr. Murdock said:
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.

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.
 
M

Mr. Murdock

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,815
Latest member
treekmostly22

Latest Threads

Top