Showing posts with label Sitecore. Show all posts
Showing posts with label Sitecore. Show all posts

Tuesday, February 22, 2022

Sitecore XConnect Operation #0, AlreadyExists, Contact and XConnect FacetOperationException: Operation #1, ReferenceNotFound Issue

Description: We have been seeing below issues when trying to save or retrieve XConnect Data
2022-02-17 13:56:51.743 -05:00 [Error] Sitecore.XConnect.Operations.AddContactOperation: Sitecore.XConnect.Operations.EntityOperationException: Operation #0, AlreadyExists, Contact 2022-02-17 13:56:51.743 -05:00 [Error] Sitecore.XConnect.Operations.SetFacetOperation`1[Sitecore.XConnect.Facet]: Sitecore.XConnect.Operations.FacetOperationException: Operation #1, ReferenceNotFound, Contact, Classification 2022-02-17 13:56:51.743 -05:00 [Error] ["XdbContextLoggingPlugin"] XdbContext Batch Execution Exception Sitecore.XConnect.Operations.EntityOperationException: Operation #0, AlreadyExists, Contact 2022-02-17 13:56:51.743 -05:00 [Error] ["XdbContextLoggingPlugin"] XdbContext Batch Execution Exception
Inorder to resolve this issue there are multiple checks one has to go through :

Scenario 1

Check with Sitecore as Sitecore already has a hot fix for below issue: 

Sitecore XP 9.0.0: SC Hotfix 316493-1.zip
Sitecore XP 9.0.1: SC Hotfix 307306-1.zip
Sitecore XP 9.0.2: SC Hotfix 307348-1.zip
Sitecore XP 9.1.0: SC Hotfix 329879-1.zip
Sitecore XP 9.1.1: SC Hotfix-343592-1.zip
Sitecore XP 9.2.0: SC Hotfix 490409-1.zip
Sitecore XP 9.3.0: SC Hotfix 449095-1.zip

Here is the reference to the Knowledge Center Article for Sitecore Support. 

Note : Make sure to apply this fix in Standalone instances and test it thoroughly before proceeding to  CM and CD instances. Also this fix should be applied first in CM before any modifications in CD Instances.  

Tip: You can verify this dll fix by navigating to the bin folder and look at the properties : 






Once the above hotfix is applied it should fix the issue. 

If the issue still persists continue below..

Scenario 2: 

Verify the shared session state settings and make sure that: 

  • Session State Stores such as Private and Shared are in sync between the config files. Tip: Use instance's show admin page where you can view all the configurations ( including the patch files ).
  • Similarly verify Session State Processes ( In-Proc , Out-of-Proc / Custom ) are in sync. 
  • Finally check the Load Balancer configuration as the settings for above would depend on whether if Sticky Sessions are configured. Reminder - We can only configure one Session State Server for one CD Cluster. 
Refer to this Knowledge Center Article to tune these settings. 

Scenario 3: 

In our scenario the above fix partially fixed the issue however CPU was running high and Sessions were locked and ended up in a Deadlock Sate. 

After thorough research and help from Sitecore from we found out : 

  • SQL Sessions on the server were blocked. We had to end the sessions, recycle App Pool. 
  • Removed orphaned Contact which had high number of Interactions using Sitecore ADM Module. This module comes in very handy to maintain Analytical Data, rebuild indexes and purge Contact Data when not needed. Here is a link to the module - Sitecore ADM Module

Hope this helps. Feel free to share any similar experiences and resolution paths. 

Tuesday, January 27, 2015

How to Enhance Sitecore Content Editor Performance


This post is written to provide few tips to improve Sitecore Content Editor performance for Sitecore users. These tips have been uncovered during the development phases.

  1. Number of items under any parent item affects how quickly that parent renders. As Sitecore suggests try to limit these items to 25 and avoid items more than 100 items under one parent item. This will have a huge impact on Sitecore performance.                    
  2. While creating a data template organize fields into different sections rather than having all of them in a single section. Also remember to collapse sections that aren't used frequently.                                                                                                                          
  3. For any item hide the sections and fields inherited from Standard Template. In order to do the same login into Sitecore Content Editor. Click view in the ribbon and uncheck Standard Fields option.

    4.  Application Options will also have a minimal impact on client performance. 
         Disable the options that aren't used frequently. 

         Login into Sitecore using content editor and click Sitecore icon on the top left                          corner and select Application Options.


       5. While creating a list type field types consider using TreeListEx field type since it only             processes and displays options when a user clicks the Edit command to update the               field value.                                                                                                                        
       6. If your site is configured with Page editor then I would suggest using Page Editor                   than Content Editor.                                                                                                            
       7. Encourage smart or Incremental publishing for publishing the changes to web                        database.                                                                                                                               
      8. Enable static and dynamic HTTP compression in IIS. This speeds up both the                       Sitecore client and the public web site and is especially beneficial in environments                 with a low bandwidth.

     9. Set the ContentEditor.RenderCollapsedSections setting to False. This is a hidden                  setting that is set to True by default. Changing this setting can help a lot.                           
   10.  Sitecore recommends to have no more than 5-10 versions per item in Master                         Database.