Huy Le
Mar 31, 2014
  4487
(5 votes)

Job Fails Issue

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:

http://epiwiki.se/tools/application-restart-detector

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.Environment.get_StackTrace()
   at System.Web.Hosting.HostingEnvironment.InitiateShutdownInternal()
   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)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()

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:

http://epiwiki.se/tools/asseblyloaderdetector

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:

Bug #112977: Excessive recompilations causing performance problems

http://world.episerver.com/Documentation/Release-Notes/ReleaseNote/?releaseNoteId=112977

Thanks to all that gave assistance on this case! //Paul & co

Mar 31, 2014

Comments

Vincent
Vincent Apr 1, 2014 03:35 AM

Is EPiServer team going to release a patch for CMS 6R2?

Apr 1, 2014 03:07 PM

@code monkey: could you create a support ticket for this?

Please login to comment.
Latest blogs
Opti ID overview

Opti ID allows you to log in once and switch between Optimizely products using Okta, Entra ID, or a local account. You can also manage all your use...

K Khan | Jul 26, 2024

Getting Started with Optimizely SaaS using Next.js Starter App - Extend a component - Part 3

This is the final part of our Optimizely SaaS CMS proof-of-concept (POC) blog series. In this post, we'll dive into extending a component within th...

Raghavendra Murthy | Jul 23, 2024 | Syndicated blog

Optimizely Graph – Faceting with Geta Categories

Overview As Optimizely Graph (and Content Cloud SaaS) makes its global debut, it is known that there are going to be some bugs and quirks. One of t...

Eric Markson | Jul 22, 2024 | Syndicated blog

Integration Bynder (DAM) with Optimizely

Bynder is a comprehensive digital asset management (DAM) platform that enables businesses to efficiently manage, store, organize, and share their...

Sanjay Kumar | Jul 22, 2024

Frontend Hosting for SaaS CMS Solutions

Introduction Now that CMS SaaS Core has gone into general availability, it is a good time to start discussing where to host the head. SaaS Core is...

Minesh Shah (Netcel) | Jul 20, 2024

Optimizely London Dev Meetup 11th July 2024

On 11th July 2024 in London Niteco and Netcel along with Optimizely ran the London Developer meetup. There was an great agenda of talks that we put...

Scott Reed | Jul 19, 2024