Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on stats tab #213

Open
scrog opened this issue Mar 26, 2024 · 6 comments
Open

Error on stats tab #213

scrog opened this issue Mar 26, 2024 · 6 comments

Comments

@scrog
Copy link

scrog commented Mar 26, 2024

Hi,
We have a customer who have an issue with the production environment, when trying to access the stats tab there is an error:
[ArgumentException: An item with the same key has already been added.] System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) +60 System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) +5790801
System.Linq.Enumerable.ToDictionary(IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer) +302
Epinova.ElasticSearch.Core.EPiServer.Controllers.ElasticTrackingController.GetModel() in C:\projects\epinova-elasticsearch\src\Epinova.ElasticSearch.Core.EPiServer\Controllers\ElasticTrackingController.cs:45
Epinova.ElasticSearch.Core.EPiServer.Controllers.ElasticTrackingController.Index() in C:\projects\epinova-elasticsearch\src\Epinova.ElasticSearch.Core.EPiServer\Controllers\ElasticTrackingController.cs:33
lambda_method(Closure , ControllerBase , Object[] ) +87
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) +35 System.Web.Mvc.Async.<>c.<BeginInvokeSynchronousActionMethod>b__9_0(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +39 System.Web.Mvc.Async.WrappedAsyncResult2.CallEndDelegate(IAsyncResult asyncResult) +77
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +42
System.Web.Mvc.Async.AsyncInvocationWithFilters.b__11_0() +72
System.Web.Mvc.Async.<>c__DisplayClass11_1.b__2() +396
System.Web.Mvc.Async.<>c__DisplayClass11_1.b__2() +396
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +42
System.Web.Mvc.Async.<>c__DisplayClass3_6.b__3() +50
System.Web.Mvc.Async.<>c__DisplayClass3_1.b__5(IAsyncResult asyncResult) +188
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
System.Web.Mvc.<>c.b__152_1(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +73 System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +52 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +39
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38
System.Web.Mvc.<>c.b__20_1(IAsyncResult asyncResult, ProcessRequestState innerState) +43
System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +73 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +651 System.Web.<>c__DisplayClass285_0.<ExecuteStepImpl>b__0() +40 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +155 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +134

Any ideas?

Regards!

@scrog
Copy link
Author

scrog commented Apr 8, 2024

Hi,
No one who has any input on this?

Regards!

@otanum
Copy link
Contributor

otanum commented Apr 9, 2024

Please validate that tracking table has the correct primary keys set. A similar error was fixed in 80f55d0

The fix primary keys call will most likely fail if errors already exist in the table.

@scrog
Copy link
Author

scrog commented Apr 9, 2024

Thanks!
What can be done if error in primary keys are found?

Regards!

@otanum
Copy link
Contributor

otanum commented Apr 9, 2024

The easiest solution is to empty the table.

If the search stats are really important you have to write query to locate the problems.

@scrog
Copy link
Author

scrog commented Apr 9, 2024

Thanks, will look into it. Maybe will return with more questions :-)

@scrog
Copy link
Author

scrog commented Apr 12, 2024

@otanum You where spot on, it was a duplicate in the tracking table, it was enough to remove that and everything started working again.

Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants