This happened recently in our publishing service when we started seeing below error that caused publishing to fail for items-
Mvc.ExceptionHandling.AbpExceptionFilter - Reading the request body timed out due to data arriving too slowly. See MinRequestBodyDataRate. Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Reading the request body timed out due to data arriving too slowly. See MinRequestBodyDataRate.
On investigating, it was found that our job queue was somewhat big, and our operations table were very large. This could be what's causing this issue to occur in publishing service.
We connected with Sitecore support and they recommended to modify the cleanup tasks on the publishing service side to clear these tables more often. This can be achieved by using the below patch on publishing service side -
<?xml version="1.0" encoding="utf-8"?>
<Settings>
<Commands>
<Web>
<Services>
<Add>
<Scheduler>
<Type>Sitecore.Framework.Scheduling.DefaultTaskScheduler, Sitecore.Framework.Scheduling</Type>
<As>Sitecore.Framework.Scheduling.ITaskScheduler, Sitecore.Framework.Scheduling.Abstractions</As>
<Options>
<Tasks>
<PublishJobCleanUp>
<TaskDefinition Type="Sitecore.Framework.Publishing.Tasks.PublishJobCleanupTask, Sitecore.Framework.Publishing" BindOptions="property">
<Options>
<!-- How old publishing job entries must be for the task to clean them up. Reduce this age value, to have job entries cleaned up sooner -->
<JobAge>7.00:00:00</JobAge>
<BatchSize>50</BatchSize>
</Options>
</TaskDefinition>
<TriggerDefinitions>
<Interval Type="Sitecore.Framework.Scheduling.Triggers.IntervalTriggerDefinition, Sitecore.Framework.Scheduling" BindOptions="property">
<Options Interval="12:00:00" />
</Interval>
</TriggerDefinitions>
</PublishJobCleanUp>
<PublishOperationAgeBasedCleanUp>
<TaskDefinition Type="Sitecore.Framework.Publishing.Tasks.PublishOperationAgeBasedCleanupTask, Sitecore.Framework.Publishing" BindOptions="property">
<Options>
<!-- How old publishing operation entries must be for the task to clean them up. Reduce this age value, to have operation entries cleaned up sooner -->
<PublisherOperationAge>30.00:00:00</PublisherOperationAge>
</Options>
</TaskDefinition>
<TriggerDefinitions>
<Interval Type="Sitecore.Framework.Scheduling.Triggers.IntervalTriggerDefinition, Sitecore.Framework.Scheduling" BindOptions="property">
<Options Interval="1.00:00:00" />
</Interval>
</TriggerDefinitions>
</PublishOperationAgeBasedCleanUp>
</Tasks>
</Options>
</Scheduler>
</Add>
</Services>
</Web>
</Commands>
</Settings>
Make sure you restart your publishing service after making any configuration changes in order to actually apply them.
These values in the patch are recommended for standard machines and shall be adjusted based on the publishing load.
To get more idea about what this patch does, you can check the "Task scheduling" section of the installation guide for how to update this configuration.
Hope this helps!!
Comments
Post a Comment