Clean up the EventQueue and PublishQueue tables
|
Applies to |
Content Management, EXM Dispatch, Content Delivery, and xDB Processing. |
|---|
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.
Understanding the publishing queue
Sitecore uses a publishing queue to coordinate publishing operations between instances and ensure that items are published in the correct order. Publish actions are stored internally in database tables and processed automatically by the platform.
The publishing queue is an internal mechanism and is not exposed as a user‑visible queue or dashboard. Sitecore does not provide a built‑in interface or API to list individual publish actions or to view the status of queued publishing jobs.
Visibility and limitations
Because the publishing queue is not directly visible, administrators cannot view a list of pending or completed publish actions. Publishing activity can instead be monitored indirectly through publishing logs and by observing the behavior and size of publish‑related database tables.
A growing publishing queue typically indicates blocked or slow publishing rather than a list of jobs waiting for review.
Managing the publishing queue
To prevent the publishing queue from growing indefinitely, Sitecore recommends configuring automatic cleanup of the publishing queue tables. For details, see Clean up the publishing queue automatically.
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, and xDB Processing 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.configfile, in theSitecore.Tasks.CleanupEventQueueagent configuration, edit theintervalproperty to specify how often you want the cleanup task to run. Normally, four hours is enough to process new entries:RequestResponse<agent type="Sitecore.Tasks.CleanupEventQueue, Sitecore.Kernel" method="Run" interval="04:00:00"> <DaysToKeep>1</DaysToKeep> [<IntervalToKeep>hh:mm:ss</IntervalToKeep>] </agent> -
Edit the
DaysToKeepproperty to specify the number of days you want to keep entries in the event queue:RequestResponse<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
IntervalToKeepproperty to specify the number of hours, minutes, and seconds you want to keep entries in the event queue. TheIntervalToKeepproperty overrides theDaysToKeepproperty:RequestResponse<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.configfile.
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, and xDB Processing 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.configfile, in theSitecore.Tasks.CleanupPublishQueueagent configuration, edit theintervalproperty 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:RequestResponse<agent type="Sitecore.Tasks.CleanupPublishQueue, Sitecore.Kernel" method="Run" interval="04:00:00"> <DaysToKeep>30</DaysToKeep> </agent> -
Edit the
DaysToKeepproperty to specify the number of days you want to keep entries in the publishing queue:RequestResponse<agent type="Sitecore.Tasks.CleanupPublishQueue, Sitecore.Kernel" method="Run" interval="04:00:00"> <DaysToKeep>30</DaysToKeep> </agent> -
Save the
Sitecore.configfile.