We are observing that DTUs are shooting up while the application startsup in Azure PAAS environment, however the frequency is not consistent- sometime we restart the webapp explicitly and sometime it's get restarted via Microsoft patches.
This is the plan we had for SQL:
Two pools of 100 DTU each and databases are distributed, we changed this recently and allocated dedicated memory for web DB.
With this latest change we observed some improvements and site was coming up after restart but sometimes it was still failing.
I also observed that there is Sync process which runs once in a day and process several items into Sitecore from third part system, with this when we checked the PublishQueue and Event Queue table for all the database this is what we see:
Master DB : Publish queue: 893778 (count is increasing)
Master DB : Event queue: 160772 (count is increasing)
Core DB : Publish queue: 0
Core DB : Event queue: 467790 (count is increasing)
Web DB : Publish queue: 0
Web DB : Event queue: 138448
Following are the Agent details from Master:
<agent type="Sitecore.Tasks.CleanupPublishQueue, Sitecore.Kernel" method="Run" interval="04:00:00">
<DaysToKeep>30</DaysToKeep>
</agent>
<agent type="Sitecore.Tasks.CleanupEventQueue, Sitecore.Kernel" method="Run" interval="04:00:00">
<DaysToKeep>1</DaysToKeep>
</agent>
Following are the Agent details from Web:
<agent type="Sitecore.Tasks.CleanupPublishQueue, Sitecore.Kernel" method="Run" interval="04:00:00">
<DaysToKeep>30</DaysToKeep>
</agent>
<agent type="Sitecore.Tasks.CleanupEventQueue, Sitecore.Kernel" method="Run" interval="04:00:00">
<DaysToKeep>1/DaysToKeep>
</agent>
So- overall looking into the Event and PublishQueue records it looks that we really need to update the settings for both Event and PublishQueque so that we can limit the records on both the tables-and to start with here is what i am thinking to update:
For PublishQueue
<DaysToKeep>2</DaysToKeep>
For EventQueue
<IntervalToKeep>04:00:00</IntervalToKeep>
Other than this- we have very limited prefetch cache for master and core DBs so don't think this should be a problem.
What you guys think could be the possible root cause of the error apart from the points mentioned above?
We can also try clearing the Event/Publish table and leave top 1000 records(as per CMS fine tuning guide) and than on top of that we will have the patch to update the agent values.
Sitecore version- 9.0.2