Error importing products


I'm getting an "The event manager has been stopped." error after about 15 minutes of running an import job.

  Message=One or more errors occurred.
   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.CatalogContentCommitterHandler.SaveVersionInternal(CatalogContentBase content, SaveAction action, String currentUser)
   at EPiServer.Commerce.Catalog.Provider.CatalogContentCommitterHandler.Save(CatalogContentBase content, SaveAction action, String currentUser)
   at EPiServer.Commerce.Catalog.Provider.CatalogContentProvider.Save(IContent content, SaveAction action)
   at EPiServer.Core.Internal.DefaultContentRepository.Save(IContent content, SaveAction action, AccessLevel access)
   at ETL.ProductImporter.ProductImporter.<>c__DisplayClass68_1.<UpsertCustomProduct>b__0() in C:\Projects\ETL\ProductImporter\ProductImporter.cs:line 887

Inner Exception 1:
InvalidOperationException: The event manager has been stopped.

Anyway to avoid this error? It's running from inside a Hangfire task instead of a scheduledJob.

error is throw when i call this code:

return contentRepo.Save(productToChange, SaveAction.Publish, AccessLevel.NoAccess);
Edited, Feb 21, 2020 16:41

You can try set this setting to false

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

If you do not need the event driven indexing

Feb 21, 2020 20:11
Quan Mai - Feb 24, 2020 10:57
I meant set it to true

Quan, shouldn't that be set to true to disable event driven indexing? :)

Feb 24, 2020 10:53
Quan Mai - Feb 24, 2020 10:57
true. I typed it on mobile and then went on to check the setting name and the change my answer half way and then there is no way to edit my answer

Thanks @Quan I'm trying your solution but as you can imagine, it's a long import.

Feb 24, 2020 10:59
VLN Prasad - Dec 05, 2020 11:48
Excellent information

I'm getting a new, equally cryptic message now, so perhaps the app config flag is working, but now this... (still on 'contentRepo.Save')

Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source=<Cannot evaluate the exception source>
<Cannot evaluate the exception stack trace>

I may need a new forum post for this one :-S

Edited, Feb 24, 2020 15:10

Yes you should. I think you might try on a different machine to make sure it's not hardware related 

Feb 24, 2020 15:13
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.