Deploy Marketing Definitions fails with Timeout Error

Recently, we faced timeout exception while deploying campaign marketing definition item from Marketing Control Panel:

ERROR One or more exceptions occurred while processing the subscribers to the 'item:saved' event.
Exception[1]: System.TimeoutException 
Message[1]: Save operation for definition id:[{EB1F792F-DD50-41DC-B5E7-61373EC915B5}] could not be completed within specified timeframe. It will be re-run in the background. 
Source[1]: Sitecore.Marketing.xMgmt 
   at Sitecore.Marketing.xMgmt.Pipelines.DeployDefinition.Deploy.DeployItem[TDefinition](Item item, Template itemTemplate, Guid expectedTemplateId, IReadOnlyDictionary`2 templatesInheritanceDictionary)
   at Sitecore.Marketing.xMgmt.Pipelines.DeployDefinition.Deploy.Process(DeployDefinitionArgs args)
   at (Object , Object )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.Marketing.xMgmt.Pipelines.DeployDefinition.DeployDefinitionPipeline.<&gt;c__DisplayClass1_0.<Run&gt;b__0()
   at Sitecore.Marketing.Core.IgnoreRecursiveCalls.Run(Guid id, Action action)
   at Sitecore.Marketing.xMgmt.Pipelines.DeployDefinition.DeployDefinitionPipeline.Run(DeployDefinitionArgs args)
   at Sitecore.Events.Event.EventSubscribers.RaiseEvent(String eventName, Object[] parameters, EventResult result)

Sometimes the process of deploying can take a longer time than the set timeout which is 30 seconds. This timeout is hard-coded in the Sitecore.Marketing.xMgmt.Pipelines.DeployDefinition.Deploy class implementation.

To resolve the issue, install the patch below on CM role:
https://github.com/SitecoreSupport/Sitecore.Support.116539/releases

In this patch, the DefinitionDeploy.Timeout setting is implemented. This setting controls the timeout and its value is set to 1 minute in the patch.

<configuration xmlns:set="http://www.sitecore.net/xmlconfig/set/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
  <sitecore role:require="ContentManagement or Standalone">
     <pipelines>
       <deployDefinition>
         <processor type="Sitecore.Marketing.xMgmt.Pipelines.DeployDefinition.Deploy, Sitecore.Marketing.xMgmt" set:type="Sitecore.Support.Marketing.xMgmt.Pipelines.DeployDefinition.Deploy, Sitecore.Support.116539">
           <DeployItemTimeout desc="DeployItemTimeout">00:01:00</DeployItemTimeout>
         </processor>
       </deployDefinition>
     </pipelines>
   </sitecore>
</configuration>

There is one more issue while deploying marketing definitions from Control Panel using Deploy Marketing Definitions Wizard on Azure Web App. Refer the article below regarding the issue and patch to resolve it:
https://kb.sitecore.net/articles/322554

Refer following Sitecore document to know more about Deploying Marketing Definitions:
https://doc.sitecore.com/users/82/sitecore-experience-platform/en/deploy-marketing-definitions-and-taxonomies.html

PS: Contact Sitecore Support before applying the patch for any of the issues mentioned above.

Advertisements

Tagged: ,

One thought on “Deploy Marketing Definitions fails with Timeout Error

  1. shyamvarmablog September 28, 2019 at 1:08 pm Reply

    Very good tip in addressing the timeout issue , well done – Thanks

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: