Newsletter unsubscribed

Wei Wang asked on March 4, 2021 18:16

Hi,

We are on Kentico 11 v11.0.48. Starting this morning people are being unsubsribed from newsletters without doing anything on their own. Here is what is on the event log with some deadlock issue. But don't understand what is going on here, what does the error indicate? We have seperate Marketing DB.

Message:

DELETE FROM OM_ActivityRecalculationQueue WHERE [ActivityRecalculationQueueActivityID] IN ( SELECT [ActivityID] FROM OM_Activity WHERE [ActivityContactID] = @ActivityContactID ) DELETE FROM OM_Activity WHERE [ActivityContactID] = @ActivityContactID DELETE FROM OM_AccountContact WHERE [ContactID] = @ContactID UPDATE OM_Account SET [AccountPrimaryContactID] = @AccountPrimaryContactID WHERE [AccountPrimaryContactID] = @AccountPrimaryContactID1 UPDATE OM_Account SET [AccountSecondaryContactID] = @AccountSecondaryContactID WHERE [AccountSecondaryContactID] = @AccountSecondaryContactID1 DELETE FROM OM_VisitorToContact WHERE [VisitorToContactContactID] = @VisitorToContactContactID DELETE FROM OM_ContactGroupMember WHERE [ContactGroupMemberRelatedID] = @ContactGroupMemberRelatedID AND ([ContactGroupMemberType] = @ContactGroupMemberType) DELETE FROM OM_ContactChangeRecalculationQueue WHERE [ContactChangeRecalculationQueueContactID] = @ContactChangeRecalculationQueueContactID DELETE FROM OM_Membership WHERE [ContactID] = @ContactID AND ([MemberType] = @MemberType) DELETE FROM OM_Membership WHERE [ContactID] = @ContactID AND ([MemberType] = @MemberType1) DELETE FROM OM_ScoreContactRule WHERE [ContactID] = @ContactID DELETE FROM CMS_ConsentAgreement WHERE [ConsentAgreementContactID] = @ConsentAgreementContactID

Caused exception: Transaction (Process ID 104) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

Exception type: System.Exception Stack trace: at CMS.DataEngine.AbstractDataConnection.HandleError(String queryText, Exception ex) at CMS.DataEngine.AbstractDataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction) at CMS.DataEngine.GeneralConnection.RunQuery(QueryParameters query) at CMS.DataEngine.GeneralConnection.RunQueryWithRetry(QueryParameters query, Int32 retryCount) at CMS.DataEngine.GeneralConnection.ExecuteQuery(QueryParameters query, Int32& totalRecords) at CMS.DataEngine.DataQueryBase1.GetDataFromDBInternal() at CMS.DataEngine.DataQueryBase1.GetDataFromDB() at CMS.DataEngine.DataQueryBase1.GetData() at CMS.DataEngine.DataQueryBase1.Execute() at CMS.DataEngine.Query.QueryBatch.Execute() at CMS.DataEngine.ObjectDependenciesRemover.RemoveObjectDependenciesByQuery(IEnumerable1 queries) at CMS.DataEngine.ObjectDependenciesRemover.RemoveObjectDependenciesAuto(BaseInfo infoObj, Boolean deleteAll, Boolean clearCache) at CMS.DataEngine.ObjectDependenciesRemover.RemoveObjectDependencies(BaseInfo infoObj, Boolean deleteAll, Boolean clearCache) at CMS.ContactManagement.ContactInfo.RemoveObjectDependencies(Boolean deleteAll, Boolean clearHashtables) at CMS.DataEngine.AbstractInfoBase1.DeleteData() at CMS.DataEngine.AbstractInfoProvider3.DeleteInfo(TInfo info) at CMS.ContactManagement.ContactMergeService.MergeContacts(ContactInfo source, ContactInfo target) at CMS.ContactManagement.CurrentContactMergeService.MergeCurrentContactWithContact(ContactInfo targetContact) at CMS.ContactManagement.ContactManagementHandlers.MergeCurrentAnonymousContactWithGivenContact(Object sender, CMSEventArgs1 e) at CMS.Base.AbstractHandler.CallEventHandler[TArgs](EventHandler1 h, TArgs e) at CMS.Base.AbstractHandler.Raise[TArgs](String partName, List1 list, TArgs e, Boolean important) at CMS.Base.SimpleHandler2.RaiseExecute(TArgs e) at CMS.Base.SimpleHandler2.StartEvent(TArgs e) at CMS.Activities.ActivityLogService.Log(IActivityInitializer activityInitializer, HttpRequestBase currentRequest, Boolean loggingDisabledInAdministration) at CMS.Newsletters.NewslettersActivityLogger.AddContactToActivityAndLogIfEnabled(IActivityInitializer activityInitializer, Boolean logActivity, Nullable1 contactId, Boolean loggingDisabledInAdministration) at CMS.Newsletters.NewsletterHandlers.SubscriberClicksTrackedLink(Object sender, LinksEventArgs e) at CMS.Base.AbstractHandler.CallEventHandler[TArgs](EventHandler1 h, TArgs e) at CMS.Base.AbstractHandler.Raise[TArgs](String partName, List1 list, TArgs e, Boolean important) at CMS.Base.SimpleHandler2.RaiseExecute(TArgs e) at CMS.Base.SimpleHandler`2.StartEvent(TArgs e) at CMS.Newsletters.LinkTracker.GetLinkUrlInternal(IEmailHashValidator emailHashValidator) at CMS.Newsletters.LinkTracker.ProcessRequest(HttpContextBase context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Message: Transaction (Process ID 104) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

Exception type: System.Data.SqlClient.SqlException Stack trace: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) at CMS.DataEngine.AbstractDataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)

Thanks, Wei Wang

Recent Answers


Brian McKeiver answered on March 5, 2021 17:39

Recalculation of activities won't cause someone to be unsubscribed. The CMS.Newsletters.LinkTracker you seen in that stack trace error is most likely just the request that triggered the scheduled task to run if the site wasn't alive.

The above error indicates the re-calc task is failing because the database is too busy, doesn't have enough resources, or is just trying to do much at once on that one resource. How is the CPU / RAM / Disk looking on the Database serer? Is it spiked at that time?

Are you sure that someone isn't forwarding around an email to people and other people are clicking that original unsubscribe link?

The other thing you could probably do is write a small piece of code that runs on the unsubscribe event: https://docs.xperience.io/k11/custom-development/handling-global-events/reference-global-system-events#ReferenceGlobalsystemevents-NewsletterEvents. You could then try and log whatever info you have in that request to try and verify some things.

0 votesVote for this answer Mark as a Correct answer

Wei Wang answered on March 5, 2021 17:43

thank you very much! Do you think this has something to do with NOT applying hotfix 11.0.49 yet?

0 votesVote for this answer Mark as a Correct answer

Brian McKeiver answered on March 5, 2021 17:57

I would lean towards no. But your best bet there would be to reach directly out to Kentico support to find out for sure.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.