Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 466737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:30:37+00:00 2026-05-12T23:30:37+00:00

.net 2.0 aspx app / IIS6 creating a silly number of threads in w3wp.exe

  • 0

.net 2.0 aspx app / IIS6 creating a silly number of threads in w3wp.exe process app pool.

The app has been isolated to its own app pool with the following settings:

RECYCLING

recycle worker processses (in minutes) : 870
recycle worker process (no of requests): (not ticked)
recycle worker processes at the following times: 00:00
max virtual memory: (not ticked)
max used memory (in mb): 1000mb (1gb)

PERFORMANCE

shutdown worker processes after being idle for (time in mins): 20
limit the kernal request queue (number of requests): 1000
enable cpu monitoring (%): 85
refresh cpu usage numbers (in mins): 5
action performed when cpu usage exceeds maximum cpu uses: NO ACTION (keeps
sessions)
max number of worker processes: 1

HEALTH

enable pinging (checked)
ping worker process every (seconds) : 30
enable rapid fail protection (checked)
failures: 5
time period (in mins):5
start time limit – worker process must startup within (seconds): 90
shutdown time limit – worker process must shutdown within (seconds): 90

Normal running would see the w3wp.exe process utilise 300MB ram and 50
therads. When my problem occurs the thread count slowly increases to 10,000
, ram to 1GB before the threads are knocked back to 0. The w3wp.exe process
is NOT shutdown and my users are not logged out (crucially), ie they keep
their session and dont have to log back in . Altough the standard 50 threads
are killed in amongst the 10, 000 rouge threads.

1) Can an expert offer any pros/cons on the above app pool settings ?

2) The “max used mem” setting appears to be doing the trick to
automatiaclly handle this issue (by killing the threads, keeping the session
alive , but can someone explain why ? … i take it threads are unrelated to
the session).

The app uses server based sessions but we store a local cookie for authentication.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T23:30:38+00:00Added an answer on May 12, 2026 at 11:30 pm

    Threads

    10k threads is insanely high, and your threads are spending more time hopping on and off the processor than doing actual work. aka thrashing.

    EDIT: I’m assuming here that it’s a .NET web application.

    Does your application use a ThreadPool or BackgroundWorkers? It seems like you’d have to be using some mechanism other than IIS’s standard thread entourage (which is only around 4 per processor) to reach 10k threads.

    Memory

    Each thread requires memory to keep track of in addition to the memory it utilizes for work, so by sheer volume of threads, you are probably reaching the 1G limit.

    Session (I will survive!)

    The application is probably setup to store Session State in persistent storage or the session state service. With this being the case, the worker process can safely be recycled without losing user state information. If the session state was configured (in the Web.config) as In-Proc, then session state would be lost when the worker process recycled.

    Work process recycling

    One other thing of note, before a worker process dies, another worker process is setup and started to take it’s place. It’s somewhere in this process that you’re probably seeing the w3wp.exe process (either old or new) with 0 threads.

    BackgroundWorkers are like rabbits

    If your threads are performing work that lasts longer than 1 second (1/2 second really), don’t use BackgroundWorkers. Unless you change the ThreadPool’s max threads (which is NOT recommended, as this can screw up deeper functionality within .NET), there’s not a hard (enough) limit on the number of BackgroundWorkers that can run concurrently. It would be better to use a Producer Consumer Queue model in that case.

    Check out this site. It’s an awesome resource on concurrent programming with lots of models and examples.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an ASP.NET 3.5 app running in IIS6 we're migrating to IIS7 &
I have this ASP.NET MVC app that I've deployed on IIS6/Win2003 as a virtual
I have a small asp.net mvc app running on WIN2k3 and IIS6. I'm using
I've been watching this tutorial http://windowsclient.net/learn/video.aspx?v=296114 . At the very begining empty Windows forms
I have a .Net app running in IIS6. The app dlls are compiled against
We have an ASP.Net app, that behaves strangely under IIS6. The app itself is
I want to Recycle IIS 6's App Pool in a web app using asp.net
I'm running a .net aspx application. I'll need my android app to access and
I know an ASP.NET app can have as many aspx pages as you want
We have a asp.net app, in which index.aspx is the default document in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.