A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
search
AI OnAI Off
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)<--->--->