Webservice drops multithread application

Discussion in 'ASP .Net Web Services' started by Mr. Murdock, Feb 26, 2008.

  1. Mr. Murdock

    Mr. Murdock Guest

    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
     
    Mr. Murdock, Feb 26, 2008
    #1
    1. Advertising

  2. Mr. Murdock

    Mr. Murdock Guest

    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.

    "Mr. Murdock" wrote:

    > 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
     
    Mr. Murdock, Feb 26, 2008
    #2
    1. Advertising

  3. "Mr. Murdock" <> wrote in message
    news:...
    >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.
    >
    > "Mr. Murdock" wrote:
    >
    >> 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?


    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
     
    John Saunders [MVP], Feb 26, 2008
    #3
  4. Mr. Murdock

    Mr. Murdock Guest

    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

    "John Saunders [MVP]" wrote:

    > "Mr. Murdock" <> wrote in message
    > news:...
    > >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.
    > >
    > > "Mr. Murdock" wrote:
    > >
    > >> 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?

    >
    > 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, Mar 3, 2008
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt Anderson

    Xcopy deployment drops user connections

    Matt Anderson, Aug 18, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    380
    S. Justin Gengo
    Aug 18, 2003
  2. steve
    Replies:
    1
    Views:
    3,876
    Larry Barowski
    Jun 15, 2004
  3. r_obert@REMOVE_THIS.hotmail.com

    Multithread or Multithread DLL?

    r_obert@REMOVE_THIS.hotmail.com, Nov 27, 2004, in forum: C++
    Replies:
    0
    Views:
    2,257
    r_obert@REMOVE_THIS.hotmail.com
    Nov 27, 2004
  4. daniele
    Replies:
    3
    Views:
    932
    Chris Ahlstrom
    Mar 11, 2010
  5. Regis d'Aubarede
    Replies:
    8
    Views:
    185
    zuerrong
    Dec 17, 2010
Loading...

Share This Page