May 26, 2015 | Charlie Turano
We received a puzzling TDS support issue recently. A customer reached out to me and reported that their automated deployment process was slowing down their CD significantly. Upon further investigation, it wasn’t just slowing down significantly – it was practically crawling. This was a weird one.
First, we looked at the build logs, which gave no clues – everything looked normal. Then we checked out the CM logs; nothing really to note here – the solution had ~2,000 items that were being deployed. Then, this is where it gets good, we looked into the CD logs – we found that every time an item was deployed ALL CACHES WERE BEING CLEARED! Which helped explain why the CD practically stopped upon deployment…..so why was it happening?
An item deployment, in Sitecore, raises a remote event in the Master database. The even clears all the caches, which allows for multiple load balanced CM servers to remain in sync with one another. The CD, for the customer, actually still had a connection straight to the Master database. Due to this it cleared all the caches, like the event is intended to. This event was clearing all the caches every single time an item was deployed.
Moral of the story: read the Sitecore docs please. For each version of Sitecore there are specific quirks that need to be accounted for. Before I set up any type of production environment I familiarize myself with the docs for that version. Additionally, if you’re running into odd behavior in your environment it’s good to have recurring scans of your installation. This can be a tedious endeavor for a company so teaming with a partner for it can be very valuable.