7

We've been noticing that some of the items we publish using the Sitecore Publishing Service are not showing up on the site.

We've verified that the published items DO appear correctly in the Web Database, and they do show up in the preview from the Content Editor.

It may be some kind of issue with the caches not being cleared properly, but we aren't really sure. Here's some more information about our setup:

  • Publishing service is set up as single instance
  • Publishing Service version 2.0
  • CM and CD on separate servers
  • When changing content, it shows up on in the SC preview
  • When publishing, the master and web databases have the same data (used Razl to verify)
  • However, content updates don’t appear on the site (CM or CD web pages)

I've also found this error in the logs. Not sure if it's relevant or not, but might as well include it

2017-05-07 11:14:16.670 -04:00 [Error] Error in the VariantsRelatedNodesTargetProducer
System.AggregateException: One or more errors occurred. ---> System.Data.SqlClient.SqlException: T-SQL ERROR 1205, SEVERITY 13, STATE 51, PROCEDURE (null), LINE 8, MESSAGE: Transaction (Process ID 53) was deadlocked on lock | generic waitable object resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader()
   at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult)
   at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryAsync(IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<ExecuteImplAsync>d__29.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Framework.Publishing.Data.Classic.SqlServer.ClassicSqlServerDataProvider.<>c__DisplayClass23_0.<<InitialiseDataQueryParams>b__0>d.MoveNext() in C:\builds\1\s\src\Sitecore.Framework.Publishing.Data.Classic\SqlServer\ClassicSqlServerDataProvider.cs:line 501
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Framework.Publishing.Data.AdoNet.NoRetryConnectionBehaviour.<ExecuteAsync>d__10`1.MoveNext() in C:\builds\1\s\src\Sitecore.Framework.Publishing.Data\AdoNet\NoRetryConnectionBehaviour.cs:line 50
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Framework.Publishing.Data.AdoNet.DatabaseConnection`1.<ExecuteAsync>d__27`1.MoveNext() in C:\builds\1\s\src\Sitecore.Framework.Publishing.Data\AdoNet\DatabaseConnection.cs:line 106
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Framework.Publishing.Data.Classic.ClassicItemRepository.<GetItemNodes>d__16.MoveNext() in C:\builds\1\s\src\Sitecore.Framework.Publishing.Data.Classic\Repositories\ClassicItemRepository.cs:line 265
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Framework.Publishing.Data.CompositeItemReadRepository.<GetNodesFromRepos>d__14.MoveNext() in C:\builds\1\s\src\Sitecore.Framework.Publishing.Data\FeatureRepositories\CompositeItemReadRepository.cs:line 141
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Framework.Publishing.Data.CompositeItemReadRepository.<GetItemNodes>d__8.MoveNext() in C:\builds\1\s\src\Sitecore.Framework.Publishing.Data\FeatureRepositories\CompositeItemReadRepository.cs:line 66
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Framework.Publishing.ManifestCalculation.PublishCandidateSource.<GetAncestors>d__16.MoveNext() in C:\builds\1\s\src\Sitecore.Framework.Publishing\ManifestCalculation\Data\PublishCandidateSource.cs:line 130
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Sitecore.Framework.Publishing.ManifestCalculation.PublishValidator.ValidateAncestors(IPublishCandidate node) in C:\builds\1\s\src\Sitecore.Framework.Publishing\ManifestCalculation\Validators\PublishValidator.cs:line 30
   at Sitecore.Framework.Publishing.ManifestCalculation.VariantsRelatedNodesTargetProducer.<ProcessCandidatesBatch>b__11_0(IPublishCandidate n) in C:\builds\1\s\src\Sitecore.Framework.Publishing\ManifestCalculation\TargetProducers\VariantsRelatedNodesTargetProducer.cs:line 84
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Sitecore.Framework.Publishing.ManifestCalculation.VariantsRelatedNodesTargetProducer.<ProcessCandidatesBatch>d__11.MoveNext() in C:\builds\1\s\src\Sitecore.Framework.Publishing\ManifestCalculation\TargetProducers\VariantsRelatedNodesTargetProducer.cs:line 83
  • Hi Slee, I am experiencing the same issue with publishing service. Can you share some details of how to fix this issue? – Vincent Oct 30 '18 at 19:46
5

In case sestocker answer is not the problem you are having:

You need also to make sure you have setup properly the instance properties(if you don't know what this is reffer to Sitecore's scaling guide). This is really important to enable Sitecore to clear the cache properly after the content is published from the content management server into the content delivery nodes. Let's assume you have one content management box with 2 content delivery nodes, here is an example on how the content management instance configuration should look like:

InstanceName = CA
Publishing.PublishingInstance = CA

Now you need to make this right for the content delivery nodes. They should have the Publishing.PublishingInstance properties with the exact same value as defined on the content management instance. In this case the value would be CA. So for the content delivery 1 you would have the values like this:

InstanceName = CD1
Publishing.PublishingInstance = CA

And the same goes for the content delivery 2 which in this case would look like this:

InstanceName = CD2
Publishing.PublishingInstance = CA

Don't forget that the InstanceName property defined on the content management server(value CA) can assume any value but they should be consistent across CA, CD1 and CD2.

  • It looks like we don't have this setup correctly. I'll try it out and if the problem goes away for a few days accept the answer, thanks. – Slee May 8 '17 at 14:03
1

If you properly see the items published in web, either output caching or some caching layer in your application itself needs invalidated. For output caching, there is configuration that needs added. Look for this section:

<event name="publish:end">
  <handler type="Sitecore.Publishing.HtmlCacheClearer, Sitecore.Kernel" method="ClearCache">
    <sites hint="list">
      <site>website</site>
    </sites>
  </handler>
</event>
<event name="publish:end:remote">
  <handler type="Sitecore.Publishing.HtmlCacheClearer, Sitecore.Kernel" method="ClearCache">
    <sites hint="list">
      <site>website</site>
    </sites>
  </handler>
</event>
  • We already have that, good to check though, thanks. – Slee May 8 '17 at 13:27
  • Using Glass caching or something similar? – sestocker May 8 '17 at 13:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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