Hey readers, I'm starting to get this exception ALL the time on my site, and my ISP is starting to complain. It's also affecting uptime:
嗨,读者们,我一直在我的网站上一直遇到这种异常,我的ISP开始抱怨。 它还影响正常运行时间:
System.Threading.ThreadAbortException: Thread was being aborted. at newtelligence.DasBlog.Web.Core.TemplateProcessor.ProcessTemplate(SharedBasePage page, Entry entry, String templateString, Control contentPlaceHolder, Macros macros) in C:\dev\DasBlog CE\source\newtelligence.DasBlog.Web.Core\TemplateProcessor.cs:line 118 at newtelligence.DasBlog.Web.Core.TemplateProcessor.ProcessTemplate(SharedBasePage page, String templateString, Control contentPlaceHolder, Macros macros) in C:\dev\DasBlog CE\source\newtelligence.DasBlog.Web.Core\TemplateProcessor.cs:line 61 at newtelligence.DasBlog.Web.Core.SharedBasePage.ProcessDayTemplate(DateTime day, Control ContentPlaceHolder) in C:\dev\DasBlog CE\source\newtelligence.DasBlog.Web.Core\SharedBasePage.cs:line 743 at newtelligence.DasBlog.Web.Core.Macros.get_Bodytext() in C:\dev\DasBlog CE\source\newtelligence.DasBlog.Web.Core\Macros.cs:line 1231 --- End of inner exception stack trace --- at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess) at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean verifyAccess) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index) at newtelligence.DasBlog.Web.Core.TemplateProcessor.InvokeMacro(Object obj, String expression) in C:\dev\DasBlog CE\source\newtelligence.DasBlog.Web.Core\TemplateProcessor.cs:line 332 at newtelligence.DasBlog.Web.Core.TemplateProcessor.ProcessTemplate(SharedBasePage page, Entry entry, String templateString, Control contentPlaceHolder, Macros macros) in C:\dev\DasBlog CE\source\newtelligence.DasBlog.Web.Core\TemplateProcessor.cs:line 105
while processing .System.Threading.ThreadAbortException:线程正在中止。 在newtelligence.DasBlog.Web.Core.TemplateProcessor.ProcessTemplate(SharedBasePage页面,条目,字符串templateString,Control contentPlaceHolder,宏)在C:\ dev \ DasBlog CE \ source \ newtelligence.DasBlog.Web.Core \ TemplateProcessor.cs :在newtelligence.DasBlog.Web.Core.TemplateProcessor.ProcessTemplate(SharedBasePage页,字符串templateString,控件contentPlaceHolder,宏宏)中的C:\ dev \ DasBlog CE \ source \ newtelligence.DasBlog.Web.Core \ TemplateProcessor.cs中的第118行:在newtelligence.DasBlog.Web.Core.SharedBasePage.ProcessDayTemplate(日期时间,控制ContentPlaceHolder)中位于C:\ dev \ DasBlog CE \ source \ newtelligence.DasBlog.Web.Core \ SharedBasePage.cs:第743行在newtelligence中的第61行。 C:\ dev \ DasBlog CE \ source \ newtelligence.DasBlog.Web.Core \ Macros.cs:line 1231中的DasBlog.Web.Core.Macros.get_Bodytext()-在系统上的内部异常堆栈跟踪结束- .Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,BindingFlags invokeAttr,活页夹活页夹,Object []参数,CultureInfo文化,在System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,BindingFlags invokeAttr,Binder活页夹,Object []参数,CultureInfo文化,布尔verifyAccess)在System.Reflection.RuntimeMethodInfo.Invoke( Object.obj,BindingFlags invokeAttr,活页夹活页夹,System.Reflection.RuntimePropertyInfo.GetValue(Object obj,Object [] index)在newtelligence.DasBlog.Web.Core.TemplateProcessor.InvokeMacro(Object obj,字符串表达式)在C:\ dev \ DasBlog CE \ source \ newtelligence.DasBlog.Web.Core \ TemplateProcessor.cs:行332在newtelligence.DasBlog.Web.Core.TemplateProcessor.ProcessTemplate(SharedBasePage页面,条目,字符串templateString,在C:\ dev \ DasBlog CE \ source \ newtelligence.DasBlog.Web.Core \ TemplateProcessor.cs:line 105中控制contentPlaceHolder,Macros宏) 同时处理。
I don't think it's dasBlog or the macro engine because:
我认为不是dasBlog或宏引擎,因为:
A. Nothing has changed in this code in months2. Most of what DasBlog does is in the Template Processor - like 90% - so if a thread were to abort, chances are it'd be happening in the code that runs 90% of the time.
答:在几个月内,此代码没有任何变化。 DasBlog所做的大部分工作都在模板处理器中-就像90%一样-因此,如果线程中止,则有机会在90%的时间运行的代码中发生这种情况。
That said, my ISP says that the site isn't recycling - they are basing this on the pid of w3wp.exe not changing. When ASP.NET "recycles" a site are they starting the AppDomain over or the whole process? I thought it was the process. Either way, you'd expect me to get another Application_Start event, and I'm not seeing that. I'm just seeing these Thread Aborts without app recycles.
就是说,我的ISP说该站点没有在回收-它们是基于w3wp.exe的pid不变的。 当ASP.NET“回收”站点时,它们是重新启动AppDomain还是整个过程? 我认为这是过程。 无论哪种方式,您都希望我得到另一个Application_Start事件,但我没有看到。 我只是看到这些线程中止而没有应用程序回收。
Any ideas as I debug this?
我调试这个有什么想法吗?
翻译自: https://www.hanselman.com/blog/threadabortexception-woes