Developer forum

Forum » Ecommerce - Standard features » Error when partial product index runs

Error when partial product index runs

Terri Donahue
Terri Donahue
Reply

Hi guys,

We are getting this error periodically when a partial index rebuild occurs:

GetProductsFromIndexQuery: An item with the same key has already been added

I have looked and do not see a partial index scheduled but when this error happens the last run was 1/1 updated rather than the full catalog. The solution is running Dw version 9.8.6. Any ideas how to resolve this. The product list page is going down multiple times a day and it take rebuilding the partial index to get products to display again.

Thanks,
Terri


Replies

 
Nicolai Pedersen
Reply

Can you find the log file - or event in DW event viewer with additional information?

Thanks!

 
Terri Donahue
Terri Donahue
Reply

Sure thing Nicolai. This is shown in EventViewer and corresponds to the error we are seeing on the front end.

2020-06-09 07:11:34.218: An error occurred while attaching module 'eCom_Catalog' (Dynamicweb.Frontend.Content). System.ArgumentException: An item with the same key has already been added.    at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)    at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)    at Dynamicweb.Ecommerce.Products.ProductService.GetByAutoIDs(IList`1 autoIDs)    at Dynamicweb.Ecommerce.Frontend.Frontend.GetProductsFromIndexQuery(ProductCatalogShowType settingsType)    at Dynamicweb.Ecommerce.Frontend.Frontend.EcomRender()    at Dynamicweb.Ecommerce.Frontend.Frontend.GetContent()    at Dynamicweb.Frontend.Content.GetModuleOutput(Paragraph paragraph, PageView pageview)

 

2020-06-09 07:11:46.093: GetProductsFromIndexQuery: An item with the same key has already been added.. System.ArgumentException: An item with the same key has already been added.    at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)    at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)    at Dynamicweb.Ecommerce.Products.ProductService.GetByAutoIDs(IList`1 autoIDs)    at Dynamicweb.Ecommerce.Frontend.Frontend.GetProductsFromIndexQuery(ProductCatalogShowType settingsType)

 

 
Nicolai Pedersen
Reply

Hi Terri

We are looking at this one. We really would like a copy of your indexes when they are in this state - just a copy of the folder.

We have a code change that will ensure you do not see the error, but we need a copy of the index files so we can find the root cause.

Thanks, Nicolai

 
Terri Donahue
Terri Donahue
Reply

Hi Nicolai,

I'll be sure to grab them next time it happens.

Terri

 
Nicolai Pedersen
Reply

You are a sweetheart!

Thanks, Nicolai

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

I can probably help you with that but from an older solution. 9.6.x

We constantly have this issue. Once maybe twice a day.

Adrian

 
Nicolai Pedersen
Reply

Be happy to get an index where the error is!

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Will send you a fresh one via WeTransfer.

I am archiving it now.

Thank you,
Adrian

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

I am sorry.

I was too slow. It got overriten by a coleague of mine.

Will send it over after the next crash.

Thank you,
Adrian

 

You must be logged in to post in the forum