10

First I referenced John West's article on agents here. He speaks of polling frequencies and intervals but neither there nor other places have I seen a clear guide on the agents that exist and best practices to their settings.

There have been a number of issues reported both here on the Sitecore Stack Exchange and other places about the event queue filling up and the need to clear it out. As can be seen here on the Sitecore Community site there are solutions to cleaning out queues, especially when they exceed the recommended 1000 row count.

Can anyone point to or provide a table which provides guidance to agent recommended settings from Development to Production?

6

Can't provide you with a list of recommendations for all agents, but as you mentioned the event queue I can give some information on the CleanupEventQueue task. As we had issues with ever growing event queue tables (as many others probably) we reached out to Sitecore support and together we came up with some patches to the configuration. The idea is:

  • On Content Management:
    • Clean the eventqueue very aggressively
  • On Content Delivery:
    • Poll the eventqueue less aggressively
    • Disable the eventqueue cleaning

Polling the event queue every 2 minutes means that if the content editor changes a page, it can take up to 2 minutes for the changes to appear on the CD. You should check with your 'customer' if this is a problem and change the value accordingly.

The patches would look like this:

Content Management

<sitecore>
  <scheduling>
    <agent type="Sitecore.Tasks.CleanupEventQueue, Sitecore.Kernel">
      <patch:attribute name="interval">00:30:00</patch:attribute>
      <DaysToKeep>
        <patch:delete />
      </DaysToKeep>
      <IntervalToKeep>01:00:00</IntervalToKeep>
    </agent>
  </scheduling>
</sitecore>

Content Delivery

<sitecore>
  <eventing>
    <eventQueue>
      <processingInterval>00:02:00</processingInterval>
    </eventQueue>
  </eventing>
  <scheduling>
    <agent type="Sitecore.Tasks.CleanupEventQueue, Sitecore.Kernel">
      <patch:attribute name="interval">00:00:00</patch:attribute>
    </agent>
  </scheduling>
</sitecore>

Changing to these values did the trick on some of our projects that had eventqueue-issues so they seem to be effective.

ps: not sure when IntervalToKeep was introduced exactly - you should check if your Sitecore version supports it. And undoubtedly someone our here does know and can add that information here.

Edit: I have no detailed information for the CleanupHistory and CleanupPublishQueue but what I normally do is lower the DaysToKeep for the CleanupPublishQueue (to 1 instead of 30). There is also an interesting blog post from Alan Coates on the subject, mainly focussing on the "how" though - but including a solution to tweak the CleanupHistory through the EntryLifeTime setting - which I haven't done myself yet. I do think it's quite hard to give real numbers as this is also determined by your content editors - how often and how much do they edit and publish..

  • Can you provide examples for the CleanupHistory and CleanupPublishQueue that you would use and recommend for CD and CM? – Michael West Oct 23 '16 at 16:16
  • Added some info on History and Publish, although it's probably still quite vague - do read the blog from Alan ;) – Gatogordo Oct 24 '16 at 10:19
3

I also cannot provide a direction to a table or list of recommendations, but I use the following rules of thumb for setting frequency:

  1. Use production frequency in at least one non-production environment that has high usage so that the team will have an early sign if the frequency is causing an issue.
  2. If the business requirement is to have a high level of sync between actions in the CM and display on the CD using remote events (such as publishing) consider using a high frequency setting combined with an event handler that has a small impact and doesn't take long to operate.
  3. Never set the frequency lower than the time it takes for the agent to complete it's job.
  4. Related: Always add a 'quiet' time buffer into the frequency to ensure that the agent, under regular usage, has some non-running time between executions.
  5. Normal running time should be determined against production-type data as most agents are impacted by the size of the data being processed.
  6. If agent execution is interfering with system operation on CM, consider moving the execution to a processing instance to allow for dedicated processing (such as aggregation of the collection DB)
  7. If agent execution is interfering with system operation on CD, consider disabling the agents if they have no benefit to the CD operation. If they are required for the CD to function, they usually can't be offloaded to processing, so set the frequency to a longer timespan than you would on CM.
  • Thank you. Would you be able to provide some samples of agents, frequencies, and intervals you recently used for a CM CD configuration? – Michael West Oct 23 '16 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.