Tech Off Thread

5 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

How to recycle all ASP.net threads?

Back to Forum: Tech Off
  • User profile image
    Minh

    I'm going to be using Thread Local Storage on our web services (queue connection caching) and would like to be able to dump our cache at a moment's notice.

    I thought maybe an IISRESET would kill all ASP.net's threads, but the thread pool seems unaffected. I named the threads if the name is null, but after an IISRESET, those threads retain their names.

    I'm concluding that my Thread Local Storage would also survive the reset. Any idea on this problem?

  • User profile image
    Ang3lFir3

    have you tried recycling the appPool for the application in which the webservice is running? you can manually recycle the appPool from within IIS and see how that effects it... you can also try restarting the appPools as needed..... this should clear all the threads (at least i believe it should) as this will restart the w3wp.exe processes that the site is running in.

    This is all assuming you are talking about IIS6.0

  • User profile image
    Minh

    Aahh... that could be. I'll give that a shot. But that's the problem.

    Our production servers are WS 2K3 w/ IIS 6, whereas, our development machines are WinXP w/ IIS 5.1.

    I got lots of setting up to do.

    Thanks for the tips, though.

  • User profile image
    Red5

    I haven't tried it but:  update the web.config with some dummy data, a change in this file might restart things from scratch??
    Just a quick thought.

  • User profile image
    Minh

    Red5 wrote:
    I haven't tried it but:  update the web.config with some dummy data, a change in this file might restart things from scratch??
    Just a quick thought.
    This would definitely restart the web application, but I was watching what IISRESET does (it rebooted the IIS process) yet the ASP.net thread names survived. I guess I should try this with TLS before I go further to see if TLS gets disposed of with an IISRESET.

    metrics metrics metrics, I guess.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.