If the Analytics.ClusterName setting is not specified in the Sitecore.Analytics.Tracking.config file, the following exception may occur in the log files of the content delivery servers:
ERROR General error when submitting contact.
Exception: System.InvalidOperationException
Message: A contact is locked by another operation.
Source: Sitecore.Analytics.MongoDB
at Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbContactStorage.LoadContactIdentifier(ID contactId, LeaseOwner leaseOwner)
at Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbDataAdapterProvider.ObsoleteContact(ID contactId, LeaseOwner leaseOwner, ID successorId)
at Sitecore.Analytics.Data.ContactRepository.SaveContact(Contact contact, ContactSaveOptions options)
at Sitecore.Analytics.Tracking.ContactManager.SubmitContact(Contact contact, ContactSaveOptions options)
To resolve the issue, follow the steps below for all Content Delivery servers:
<setting name="Analytics.ClusterName" value="yoursite.net" />Note: in case of a clustered environment, all Content Management Sitecore instances should be able to establish HTTP connections to the cluster without any authentication (cookie-based, basic, federated etc.). If the cluster only accepts HTTPS connections or redirects all HTTP requests to corresponding HTTPS ones, the Analytics.ClusterName setting value must include HTTPS schema:
<setting name="Analytics.ClusterName" value="https://yoursite.net" />