Clean up the EventQueue and PublishQueue tables
Applies to |
Content Management, EXM Dispatch, Content Delivery, xDB Processing, and xDB Reporting. |
---|
The event queue is a table named EventQueue
in the Master
database on the Content Management instance. It is used to share events between instances - mostly during index updates and cache clearing.
The publishing queue is a table named PublishQueue
in the Master database on the Content Management instance. It is used for incremental publishing of a website.
You can experience performance issues if the queues grows too large. To improve performance, you can clean up the queues on demand, or Sitecore can clean them up automatically.
If you have more than one Content Management instance, you must clean up the queues on each instance separately.
Clean up the event queue on demand
To clean up the event queue on demand:
-
On the Sitecore Launchpad, click Control Panel, Administration tools, and Event Queue Statistics.
-
In the Cleanup EventQueue pane, select the Master database.
-
Edit the Interval to keep after cleanup field to how many hours you want to allow for new entries to be processed before they are cleaned up. Normally, four hours is enough.
-
Click Cleanup.
Clean up the event queue automatically
You do not have to clean up the event queue on the Content Delivery, EXM Dispatch, xDB Processing, and xDB Reporting instances, so you can safely remove the Sitecore.Tasks.CleanupEventQueue
configuration from these instances or deactivate it by setting the interval
property to 0
.
To configure automatic cleanup of the EventQueue
table:
-
In the
<wwwroot>\App_Config\Sitecore.config
file, in theSitecore.Tasks.CleanupEventQueue
agent configuration, edit theinterval
property to specify how often you want the cleanup task to run. Normally, four hours is enough to process new entries:RequestResponseshell<agent type="Sitecore.Tasks.CleanupEventQueue, Sitecore.Kernel" method="Run" interval="04:00:00"> <DaysToKeep>1</DaysToKeep> [<IntervalToKeep>hh:mm:ss</IntervalToKeep>] </agent>
-
Edit the
DaysToKeep
property to specify the number of days you want to keep entries in the event queue:RequestResponseshell<agent type="Sitecore.Tasks.CleanupEventQueue, Sitecore.Kernel" method="Run" interval="04:00:00"> <DaysToKeep>1</DaysToKeep> [<IntervalToKeep>hh:mm:ss</IntervalToKeep>] </agent>
-
If you want more granularity, edit the
IntervalToKeep
property to specify the number of hours, minutes, and seconds you want to keep entries in the event queue. TheIntervalToKeep
property overrides theDaysToKeep
property:RequestResponseshell<agent type="Sitecore.Tasks.CleanupEventQueue, Sitecore.Kernel" method="Run" interval="04:00:00"> <DaysToKeep>1</DaysToKeep> <IntervalToKeep>hh:mm:ss</IntervalToKeep> </agent>
-
Save the
Sitecore.config
file.
Clean up the publishing queue on demand
To clean up the publishing queue on demand:
-
On the Sitecore Launchpad, click Control Panel, Administration tools, and Publish Queue Statistics.
-
In the Cleanup Publish Queue pane, select the Master database.
-
Edit the Interval to keep after cleanup field to how many hours you want to allow for new entries to be processed before they are cleaned up. Normally, four hours is enough.
-
Click Cleanup.
Clean up the publishing queue automatically
You do not have to clean up the publishing queue on the Content Delivery, EXM Dispatch, xDB Processing, and xDB Reporting instances, so you can safely remove the Sitecore.Tasks.CleanupPublishQueue
configuration from these instances or deactivate it by setting the interval
property to 0
.
To configure automatic cleanup of the PublishQueue
table:
-
In the
<wwwroot>\App_Config\Sitecore.config
file, in theSitecore.Tasks.CleanupPublishQueue
agent configuration, edit theinterval
property to specify how often you want the cleanup task to run. Normally, four hours is enough to process new entries, but if you do not use incremental publishing, you can configure it to run more frequently:RequestResponseshell<agent type="Sitecore.Tasks.CleanupPublishQueue, Sitecore.Kernel" method="Run" interval="04:00:00"> <DaysToKeep>30</DaysToKeep> </agent>
-
Edit the
DaysToKeep
property to specify the number of days you want to keep entries in the publishing queue:RequestResponseshell<agent type="Sitecore.Tasks.CleanupPublishQueue, Sitecore.Kernel" method="Run" interval="04:00:00"> <DaysToKeep>30</DaysToKeep> </agent>
-
Save the
Sitecore.config
file.