|Number of votes:||5|
Here's a short note on a case we had recently, hopefully it might be useful to somebody.
A Partner had an issue with a custom EPiServer scheduled job (commerce import) that failed intermittently on their CMS 7 site, the error message that the job failed with was: "Thread was being aborted."
We suspected that the application was going down and after some pondering a colleague suggested adding this very useful tool to the site Bin folder which logs application shutdown events on the machine’s Window log:
The tool logged the below shutdown event in the Windows logs (Application) on the machine very shortly before the job stopped running.
This was logged many times on the server:
Application restarted because:MaxRecompilationsReached
at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Web.HttpRuntime.ShutdownAppDomain(String stackTrace)
at System.Web.Compilation.DiskBuildResultCache.ShutdownCallBack(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
We were still unsure what lay behind the error so we added another tool made by the same colleague, though this didn't shed any light on the issue this time:
A couple of colleagues mentioned that there was a recent bug report concerning EPiServer.Web.Hosting.VirtualPathMappedProvider
,which we saw was being used on the site in question.
The ="DynamicContentPreview" VirtualPathMappedProvider was then commented out from the episerverframework config.
After this was commented out the MaxRecompilationsReached error stopped the job has not failed since.
The cause of this issue is covered by this recently reported bug:
Thanks to all that gave assistance on this case! //Paul & co