Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

"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
Vote:
 

Hi, anyone with a solution to this issue?

#266389
Nov 08, 2021 6:41
Vote:
 

If you don't use automatic indexing for SearchProvider (i.e. you are using Find etc.), you can set this setting 

    • <add key="episerver:DisableCatalogEventDrivenIndexing" value="true" />

Episerver - update 194 | Optimizely Developer Community

to disable this, which would solve this particularly issue

#266392
Nov 08, 2021 7:58
CHKN - Nov 19, 2021 9:40
Do you have a solution for Commerce 10.8.0?
Quan Mai - Nov 19, 2021 9:53
Unfortunately no, that's why you should always update
CHKN - Nov 19, 2021 10:00
Okay, thanks for the reply.
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.