2

We upgraded to Sitecore 10.1 from Sitecore 8.2. I am facing publishing issues.

I have migrated master database content in Sitecore 10.1. The publishing of some sites to the web database are fine. Some sites take few hours to publish but they finish successfully without any errors.

Some of the content stuck after number of items. For example, I published an item with child items (around 60 child items) and it was stuck after 46 items. There were no errors in the log and after stuck on the same 46 item, If I leave the page open for couple of hours then the page redirects to the login page. Some of the successful published items which take few hours to publish don't result in redirecting to the login page. This is just happening with the stuck items.

Its very difficult to figure out the issue because there are no failures in the log. Most of the content published fine but this is happening with very few items.

I cleared the publishing queue, restarted website several times and published the items with Smart/ Republish optons.

Any recommendations?

publishing stuck

6
  • Look for custom publishing handlers and/or item:saved handlers. Get rid of them.
    – Mark Cassidy
    Commented Jan 11, 2022 at 4:35
  • @MarkCassidy all the custom publishing is disabled Commented Jan 11, 2022 at 5:15
  • Are you publishing with child & related items "on"? If so, try with related items off.
    – Gatogordo
    Commented Jan 11, 2022 at 8:06
  • @Gatogordo yeah worked fine when related items are off but why its not working with related items and there are no errors. Commented Jan 11, 2022 at 9:01
  • Don't know why it's not working in your specific case, but I do know that the combination of child & related items can lead to a very huge number of items to check/publish and is actually the slowest way to get anything published.
    – Gatogordo
    Commented Jan 11, 2022 at 12:52

1 Answer 1

7

If it happens only when you select the "Publish related items" option in the "Publish Item" dialogue, then it must be related to the deep scan feature. Starting from version 9 the deep scan setting is enabled by default.

When the deep scan feature is used, it affects publishing speed of related items. Sitecore documentation says:

The deep scan setting determines if related items are published recursively, that is, whether to publish related items of related items):

  • If deep scan is enabled, related items are published recursively - that is, related items of related items are also published. Deep scan is enabled by default.
  • If deep scan is disabled, only directly related items are published.

You can disable deep scan to reduce the number of publishing operations and improve performance.

You may want to disable the deep scan setting to revert back to the publishing logic you had in Sitecore 8.2. It can be done by adding the following config patch:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <sitecore role:define="ContentManagement">
        <settings>
         <setting name="Publishing.DeepScanRelatedItems" value="false"/>
        </settings>
    </sitecore>
</configuration>
2
  • 1
    This setting literally wiped our web DB following a migration when running a smart publish with related items checked. What was the thinking behind enabling it by default??
    – Sean T
    Commented Nov 24, 2022 at 10:46
  • @SeanT yeah I had a similar problem in the past when publishing of one page caused a republish of all regional site trees because they had the same global setting item in "related items". I can't imagine why this feature is still enabled by default, even in the latest versions of Sitecore 10. Commented Nov 24, 2022 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.