Case Study: Optimizing Sitecore Workbox for Large Content Environments

Case Study: Optimizing Sitecore Workbox for Large Content Environments

By admin October 17, 2024

Overview:

Upon reading posts from Sitecore Symposium on LinkedIn and learning about Sitecore Stream, I was brought back to a performance issue we encountered with Sitecore Workbox earlier in the year.Significant speed problems were seen by our client, who handles a lot of content; in particular, non-admin users were having timeouts when attempting to load the Workbox.

The Challenge:

The client's Sitecore XP 9.2 instance was struggling with Workbox performance due to the massive amount of items in Draft state across multiple versions. Out-of-the-box (OOTB) Sitecore Workbox loads all items in all workflow states, which led to excessive database load and frequent timeouts for non-admin users. Admins could access the Workbox, but it took around 3 minutes, while non-admins encountered timeouts after 3.8 minutes due to Azure's default timeout settings.

The root cause was that the Workbox was querying too many items in Draft and other states, causing spikes in database usage and performance degradation.


I've created a Sitecore support ticket and explained the issue.Sitecore Support suggested a range of solutions, including database index optimizations and tuning specific settings like Workbox.SingleWorkflowStateVersionLoad.Threshold, which was initially set to 8000. To enhance access control and database speed, changes were performed, such as lowering the threshold to 100 and building SQL indexes based on KB0879610. The timeouts continued, and performance only slightly improved in spite of these efforts.

Key Findings:

  • The AccessResultCache was consuming excessive memory
  • The VersionedFields table contained millions of records, adding to the database load.
  • Despite implementing various suggestions, including temporary disabling of cache size limits and tuning SQL queries, Workbox performance remained suboptimal.

The Solution: Leveraging Sitecore Advanced Workbox:

After struggling with this issue, I decided to revisit an old but reliable solution — the Sitecore Advanced Workbox. I was used this module long time in the past. We obtained the source code from GitHub and upgraded it to be compatible with Sitecore 9.2. Instead of fetching Draft items on initial load, I've changed the code to show the items in "Awaiting Approval" state.

The result? The Workbox for non-admin users started to work! No more time-outs!

Conclusion:

By customizing and upgrading the Sitecore Advanced Workbox, we successfully addressed the Workbox performance issues caused by the large volume of content in Draft state. This solution ensured smoother operation for non-admin users, significantly improving productivity and system performance.

The source code for this solution can be found here.

Featured Blogs