简体   繁体   English

当网站停止时,Oracle数据提供程序会挂起IIS工作进程

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

We're experiencing a nasty issue in Oracle 11g Release 2 where the w3wp process takes over and entire processor core, and debugging shows that the Oracle data provider is throwing ThreadAbortExceptions infinitely. 我们在Oracle 11g第2版中遇到了一个令人讨厌的问题,其中w3wp进程接管整个处理器核心,并且调试显示Oracle数据提供程序无限地抛出ThreadAbortExceptions。 A developer found this issue by doing the following: 开发人员通过执行以下操作找到了此问题:

1) Browse a web site that uses Oracle data connections locally ( http://localhost/OracleWebSite - we use IIS, not the ASP.NET dev server, for all of our sites). 1)浏览本地使用Oracle数据连接的网站( http:// localhost / OracleWebSite - 我们为所有站点使用IIS,而不是ASP.NET dev服务器)。 This ensures that the w3wp process is running and that an active Oracle pool of connections exists in the app pool. 这可确保w3wp进程正在运行,并且应用程序池中存在活动的Oracle连接池。

2) Stop the web site (or perform a Rebuild All operation in Visual Studio on the web site in question). 2)停止网站(或在相关网站上的Visual Studio中执行Rebuild All操作)。

Our Oracle connection handling in the affected applications (all Oracle web apps) is well-established and robust. 我们在受影响的应用程序(所有Oracle Web应用程序)中的Oracle连接处理已经建立并且功能强大。 This issue does not occur if we disable connection pooling. 如果我们禁用连接池,则不会发生此问题。 This issue does not occur in Oracle 11g Release 1. Oracle 11g第1版中不会发生此问题。

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. 触发重新编译的任何内容(web.config更改,app_offline.htm,.aspx文件更改等)都会导致核心上的CPU使用率最大化。 If you repeat the process, it maxes out the CPU usage on the next core, until the overall CPU usage is at 100%. 如果重复此过程,则会最大化下一个核心的CPU使用率,直到整体CPU使用率为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(). 我用sos扩展连接windbg,看起来每个maxed out核心都有一个线程卡在System.AppDomain.Unload(System.AppDomain)中,另一个卡在Oracle.DataAccess.Client.OracleTuningAgent.DoScan()上。

First thread 第一个帖子

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

Second thread 第二个帖子

  • System.AppDomain.Unload(System.AppDomain) System.AppDomain.Unload(System.AppDomain)
  • System.Web.HttpRuntime.ReleaseResourcesAndUnloadAppDomain(System.Object) System.Web.HttpRuntime.ReleaseResourcesAndUnloadAppDomain(System.Object的)
  • System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext,System.Threading.ContextCallback,System.Object)
  • System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(System.Threading. _ThreadPoolWaitCallback) System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(System.Threading._ThreadPoolWaitCallback)
  • System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(System.Object) 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. 看起来AppDomain.Unload正在等待OracleTuningAgent.DoScan完成,但该线程被阻塞或正在休眠。

Oracle has confirmed the issue (bug # 9648040) and it is a top priority. Oracle已经确认了这个问题(bug#9648040),这是一个重中之重。 In the meantime, the possible workarounds are: 与此同时,可能的解决方法是:

  1. Roll back to 11gR1/earlier client 回滚到11gR1 /早期客户端
  2. Add 'Self Tuning=false' to the connection string. 将“Self Tuning = false”添加到连接字符串。 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. 该修补程序在Oracle 11.2.0.1.2中发布,可通过oracle.com网站获得。

Unfortunately the fix is currently only available through a "My Oracle Support" account. 不幸的是,目前只能通过“My Oracle Support”帐户使用此修复程序。

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). 这已经在11.2.0.2和修补程序9966926中修复了ORACLE 11G 11.2.0.1 PATCH 5 BUG FOR WINDOWS(64位AMD64和INTEL EM64T)。

Or WORKAROUND: is to disable self tuning by adding "Self Tuning=false" to the connection string. 或者替代方法:通过向连接字符串添加“Self Tuning = false”来禁用自我调整。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM