title: IIS7: Faulting application w3wp.exe, what is the root cause of these crashes?
body: <p>Our Website is in .NET but with some old ASP and 32bits libraries too in it.  It had been working fine for a while (2 years).  But for the past month, we have seen the following error on our IIS7 server, which we have been unable to track down and fix:</p>
  
  <p>"Faulting application w3wp.exe, version 7.0.6001.18000, time stamp 0x47919413, faulting module kernel32.dll, version 6.0.6001.18215, time stamp 0x4995344f, exception code 0xe053534f, fault offset 0x0002f328, process id 0x%9, application start time 0x%10."</p>
  
  <p>We are able to reproduce the error:</p>
  
  <ul>
  <li><p>One of our .ASPX pages starts loading, executing code and queries (we have response.flush() all over the page to track where the code breaks), then it suddenly stops and we get the above error in IIS.  </p></li>
  <li><p>The page stops loading and, without the response.flush(), it's not redirecting to our error.aspx page (as configured in web.config)</p></li>
  <li><p>The error does NOT happen all the time. Sometimes, it happens 3 times in a row, then it's working fine for 15 minutes non-stop with a proper redirection to error.aspx.</p></li>
  <li><p>The error we get then is a classic: "Either BOF or EOF is True, or the current record has been deleted."</p></li>
  <li><p>When the error occurs, the page hangs and all other session on the same computer from any browsers have hanging web pages as well (BTW, we only allow 1 worker process while we are testing).  From other computers, the site loads fine.  </p></li>
  <li><p>I can recycle the Application Pool, kill w3wp.exe, restart IIS.  Nothing will do.  The only way to successfully load the page again is to Restart MS SQL which handles our Session States.  I don't know why this is, but we guessed that the Session Cookies on the users browsers points to a thread which was not terminated properly (due to the above crash) and IIS is waiting for it to terminate to process more code (?).  If someone can explain this better, that would be really helpful.  Is there a timeout which we can set to "terminate" threads?  Is it a MS SQL related issue?</p></li>
  </ul>
  
  <p>I have also looked at the Private and Virtual Memory usages, because I think our code is not the most effective and I am certain we have remaining memory leaks.  However, I saw the page crash even though both Private and Virtual Memories were still quite low (under 100MB each).</p>
  
  <p>I have used Debug Diag and WinDbg as indicated here: <a href="http://blogs.msdn.com/b/tess/archive/2009/03/20/debugging-a-net-crash-with-rules-in-debug-diag.aspx" rel="noreferrer">http://blogs.msdn.com/b/tess/archive/2009/03/20/debugging-a-net-crash-with-rules-in-debug-diag.aspx</a>, but we are not able to make windbg work, this is what we are trying to do at the moment.</p>
  
  <p>If someone could help us or point us toward the right direction that would be really great, thank you.</p>