Friday, 12 January 2018

IIS w3wp hangs indefinitely with low cpu

Recently I investigated an issue with an old application (think asp / unmanaged code / cgi) which had been working for years on IIS 7 but when it was migrated to IIS 8.5 on a newer Windows server we started to see a gradual decrease in stability. The website would just stop responding to new requests and the existing request would never time out. As it got worse over a couple of weeks it would not recover even when recycling the app pool or killing the w3wp.exe process. After trying several different things with no success we eventually found a huge number of .TMP temp files in c:\windows\temp had built up (hundreds of thousands). I believe these files were possible remnants of ODBC connections that were never cleared up properly by the runtime.

Clearing these files cleared the issue immediately and the application has been completely stable since. Hopefully this article will help you and you won't spend as long googling as I did!