title: w3wp high memory usage from one day to another
body: <p>We have one .NET webapi application (with a service autostart provider).</p>
  
  <p>The application is built by our buildserver, and the output is deployed to multiple servers and requests to the application is routed through a loadbalancer.</p>
  
  <p>The site has been performing well for several months. A couple of days ago we noticed that the applicationpool was using 3x more memory than it was the other day, on two out of 3 servers.</p>
  
  <p>The servers that now uses more memory than the others is doing so even if we iisreset, reboot the server etc. The applicationpool is allocating 3x more memory than the other immediately after it starts.</p>
  
  <p>And now to the super-weird stuff....</p>
  
  <p>To find out what was being held up in the memory, I "attached" a dotTrace profiler (remote, using remoteagent.exe) to one of the servers. The pool seemed to recycle and once it was booted it did no longer allocate 3x memory (so the memory snapshot was useless). I "deattached" the profiler from the worker process and noticed that the application pool was no longer using 3x memory. I rebooted the server, and It was still not using 3x memory.</p>
  
  <p>So... It seems like just attaching the profiler to the w3wp process fixed my problem, in a persisten way, since it's still working with the "low memory usage" after iisreset and reboots.</p>
  
  <p>Tried the same procedure on server #2 which suffered the same problem and it also fixed my problem.</p>
  
  <p>It seems like dotTrace does something magic to my workerprocesses :) ?</p>
  
  <p>Can anyone figure out the cause of this? I have more servers (in other environments) with the same problem, but I would like to know the root cause of this problem.</p>