Oracle data provider pegs IIS worker process when web site is stopped Oracle data provider pegs IIS worker process when web site is stopped oracle oracle

Oracle data provider pegs IIS worker process when web site is stopped


Anything that triggers a recompile (web.config change, app_offline.htm, .aspx file change, etc.) causes the CPU usage on the core to max out. If you repeat the process, it maxes out the CPU usage on the next core, until the overall CPU usage is at 100%.

I hooked up windbg with sos extensions and it looks like for each maxed out core there is 1 thread stuck in System.AppDomain.Unload(System.AppDomain) and another stuck on Oracle.DataAccess.Client.OracleTuningAgent.DoScan().

First thread

  • Oracle.DataAccess.Client.OracleTuningAgent.DoScan()
  • Oracle.DataAccess.Client.OracleTuningAgent.TuningFunction()
  • System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
  • System.Threading.ThreadHelper.ThreadStart()

Second thread

  • System.AppDomain.Unload(System.AppDomain)
  • System.Web.HttpRuntime.ReleaseResourcesAndUnloadAppDomain(System.Object)
  • System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
  • System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(System.Threading. _ThreadPoolWaitCallback)
  • System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(System.Object)

It looks like AppDomain.Unload is waiting on OracleTuningAgent.DoScan to finish, but that thread is blocked or sleeping.

Oracle has confirmed the issue (bug # 9648040) and it is a top priority. In the meantime, the possible workarounds are:

  1. Roll back to 11gR1/earlier client
  2. Add 'Self Tuning=false' to the connection string. You will of course lose the benefits of the automatic tuning.

-Scott


This has been resolved. The fix is released in Oracle 11.2.0.1.2, which is available through the oracle.com website.

Unfortunately the fix is currently only available through a "My Oracle Support" account.

This has been fixed in 11.2.0.2 and in Patch 9966926 ORACLE 11G 11.2.0.1 PATCH 5 BUG FOR WINDOWS (64-BIT AMD64 AND INTEL EM64T).

Or WORKAROUND: is to disable self tuning by adding "Self Tuning=false" to the connection string.