"The event manager has been stopped." Duering scheduled job

Vote:
 

Hey,

We are running a scheduled job that imports a nunch of products into Commerce, but after its been running for a while we often get a "The event manager has been stopped"(see full exception below) exception on the following line: 

contentRepository.Save(productContent, SaveAction.Publish, AccessLevel.NoAccess);

Any hints as to why this happens, and how we solve it ?

System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: The event manager has been stopped.   at EPiServer.Events.ChangeNotification.Implementation.ManagedChangeProcessor`1.ConsumeNotifyChangeResults(IEnumerable`1 items)   at EPiServer.Events.ChangeNotification.Implementation.ChangeRouter.NotifyChanges(IEnumerable`1 changes)   at EPiServer.Events.ChangeNotification.Implementation.ChangeNotificationManager.NotifyChanges[TChangedData](IEnumerable`1 changes)   at Mediachase.Data.Provider.TransactionScope.ExecuteActions(IEnumerable`1 actions)   --- End of inner exception stack trace ---   at Mediachase.Data.Provider.TransactionScope.ExecuteActions(IEnumerable`1 actions)   at Mediachase.Data.Provider.TransactionScope.ThreadStaticTransactionScope.Commit()   at Mediachase.Data.Provider.TransactionScope.Complete()   at EPiServer.Commerce.Catalog.Provider.Persistence.EntryContentBaseCommitter.UpdateExisting(EntryContentBase content, Int32 entryId)   at EPiServer.Commerce.Catalog.Provider.Persistence.EntryContentBaseCommitter.Save(CatalogContentBase content)   at EPiServer.Commerce.Catalog.Provider.CatalogContentDraftStore.DoSaveFull(CatalogContentBase content, SaveAction saveAction, String userName, Boolean forceCurrentVersion, Boolean newVersionRequired, Boolean delayedPublish)   at EPiServer.Commerce.Catalog.Provider.CatalogContentDraftStore.SaveFull(CatalogContentBase content, SaveAction saveAction)   at EPiServer.Commerce.Catalog.Provider.CatalogContentDraftStore.Save(IContent content, SaveAction saveAction)   at EPiServer.Core.DefaultContentRepository.Save(IContent content, SaveAction action, AccessLevel access)   at DisPlay.LK.Integration.ProductImporter.PopulateProduct(Product productContent, Product product) in E:\Projects\LK\GIT\Source\DisPlay.LK.Integration\ProductImporter.cs:line 179   at DisPlay.LK.Integration.ProductImporter.ImportProduct(Product product) in E:\Projects\LK\GIT\Source\DisPlay.LK.Integration\ProductImporter.cs:line 38   at DisPlay.LK.Integration.ProductImportJob.Execute() in E:\Projects\LK\GIT\Source\DisPlay.LK.Integration\ProductImportJob.cs:line 75---> (Inner Exception #0) System.InvalidOperationException: The event manager has been stopped.   at EPiServer.Events.ChangeNotification.Implementation.ManagedChangeProcessor`1.ConsumeNotifyChangeResults(IEnumerable`1 items)   at EPiServer.Events.ChangeNotification.Implementation.ChangeRouter.NotifyChanges(IEnumerable`1 changes)   at EPiServer.Events.ChangeNotification.Implementation.ChangeNotificationManager.NotifyChanges[TChangedData](IEnumerable`1 changes)   at Mediachase.Data.Provider.TransactionScope.ExecuteActions(IEnumerable`1 actions)<--->
System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: The event manager has been stopped.   at EPiServer.Events.ChangeNotification.Implementation.ManagedChangeProcessor`1.ConsumeNotifyChangeResults(IEnumerable`1 items)   at EPiServer.Events.ChangeNotification.Implementation.ChangeRouter.NotifyChanges(IEnumerable`1 changes)   at EPiServer.Events.ChangeNotification.Implementation.ChangeNotificationManager.NotifyChanges[TChangedData](IEnumerable`1 changes)   at Mediachase.Data.Provider.TransactionScope.ExecuteActions(IEnumerable`1 actions)   --- End of inner exception stack trace ---   at Mediachase.Data.Provider.TransactionScope.ExecuteActions(IEnumerable`1 actions)   at Mediachase.Data.Provider.TransactionScope.ThreadStaticTransactionScope.Commit()   at Mediachase.Data.Provider.TransactionScope.Complete()   at EPiServer.Commerce.Catalog.Provider.Persistence.EntryContentBaseCommitter.UpdateExisting(EntryContentBase content, Int32 entryId)   at EPiServer.Commerce.Catalog.Provider.Persistence.EntryContentBaseCommitter.Save(CatalogContentBase content)   at EPiServer.Commerce.Catalog.Provider.CatalogContentDraftStore.DoSaveFull(CatalogContentBase content, SaveAction saveAction, String userName, Boolean forceCurrentVersion, Boolean newVersionRequired, Boolean delayedPublish)   at EPiServer.Commerce.Catalog.Provider.CatalogContentDraftStore.SaveFull(CatalogContentBase content, SaveAction saveAction)   at EPiServer.Commerce.Catalog.Provider.CatalogContentDraftStore.Save(IContent content, SaveAction saveAction)   at EPiServer.Core.DefaultContentRepository.Save(IContent content, SaveAction action, AccessLevel access)   at DisPlay.LK.Integration.ProductImporter.PopulateProduct(Product productContent, Product product) in E:\Projects\LK\GIT\Source\DisPlay.LK.Integration\ProductImporter.cs:line 179   at DisPlay.LK.Integration.ProductImporter.ImportProduct(Product product) in E:\Projects\LK\GIT\Source\DisPlay.LK.Integration\ProductImporter.cs:line 38   at DisPlay.LK.Integration.ProductImportJob.Execute() in E:\Projects\LK\GIT\Source\DisPlay.LK.Integration\ProductImportJob.cs:line 75---> (Inner Exception #0) System.InvalidOperationException: The event manager has been stopped.   at EPiServer.Events.ChangeNotification.Implementation.ManagedChangeProcessor`1.ConsumeNotifyChangeResults(IEnumerable`1 items)   at EPiServer.Events.ChangeNotification.Implementation.ChangeRouter.NotifyChanges(IEnumerable`1 changes)   at EPiServer.Events.ChangeNotification.Implementation.ChangeNotificationManager.NotifyChanges[TChangedData](IEnumerable`1 changes)   at Mediachase.Data.Provider.TransactionScope.ExecuteActions(IEnumerable`1 actions)<--->

#140390
Oct 19, 2015 9:59
Vote:
 

Hi Klaus,

Did this ever get resolved?

// Kind regards, Torbjörn

#173250
Dec 16, 2016 21:57
Vote:
 

Hi,

 

We are experiencing the same issue as Klaus described. A job synchronizing products and variants throws that error from time to time. One thing we noticed is that the longer it takes for the job to run, the more likely is to receive that error. One other thing to mention is that the project is hosted in DXC.

Did anyone get to the bottom of this problem?

Thanks

#185598
Nov 27, 2017 12:47
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.