Catalog synchronization issues

Recently we had a production issue, where the catalog synchronization is taking a long time to complete in the production environment.  This is causing our build and deploy times longer than expected in production.

Steps to find the root cause of the issue:

    • Monitor the console logs while performing sync.
    • Look for any errors, whenever the synchronization is going into deadlock mode. Sample error:
    • INFO   | jvm 1    | srvmain | 2018/02/14 10:00:29.240 | ERROR [SyncWorker<00000XYN 1 of 4>] [1x.a.2xx.yy9] (00000XYN) [AbstractItemCopyContext] found ambigous sync timestamps for 153007345655170 and job sync :Staged->Online : expected target 26161923234182978 but found [null]
    • Basically, sync job is looking for a PK(153007345655170 ) in target catalog ( online catalog), but it couldn’t find it.
    • Now that we have PK, go to hac (hybris admin console) and look for PK analyzer ( It is under platform)
    • Enter PK  in PK analyzer-> This will tell you ItemType of the PK.

hybris-item-pk

  • Since this particular product is not available in online catalog, I have removed this item from the staged catalog and re-started the sync.
  • Executed above steps till I deleted all “orphaned” items in the staged catalog.
  • After multiple tries, I was able to complete the sync without any issues.
  • Now bigger question is, how those items got deleted from online catalog..But that is something I will look for..till that time, Happy Syncing!!!

8 Comments

    1. Hello, i believe refer to Manteinance tab , cleanup option and finally “type system” . Other option “orphaned media files” will be resolve media types issues.

      Like

  1. we are getting error “The Query Processer ran out of internal resources and could not produce a query plan” and the job gets aborted.how to fix it.

    Like

  2. There is ItemSyncTimestamp table, Stage and Online products pk’s will save in that table. While modifying the product data reference object might be missed or while removing and recreating the objects might be old reference object exists in online version.

    Goto that table to search with Souce pk with 153007345655170 and then select and delete that entry and then try it should work.

    Like

  3. Hi I’ll add this resolution from SAP Hybris note https://launchpad.support.sap.com/#/notes/0002557137

    Cause
    This can happen if the data in the database became corrupted and now contains invalid data related to synchronization. More specifically, if there is an ItemSyncTimestamp pointing to the PK of a target item that no longer exists.

    Resolution
    To fix this issue, the problematic ItemSyncTimestamps must be deleted. To find the problematic ItemSyncTimestamps, you can run the following flexible search query:
    select * from {ItemSyncTimestamp} where {targetitem} is null

    Alternatively, from the Backoffice you can also search for ItemSyncTimestamp items where “Source Item” – “is not empty” and “Target item” – “is empty”

    Instances matching those criteria will have to be deleted.

    For problems with ambiguous sync timestamps where the target is not null, you can use the following query to find problematic timestamps:

    select {sourceitem} from {ItemSyncTimestamp} group by {sourceitem}, {syncjob} having count(*) > 1

    After deleting the problematic timestamps synchronization should complete successfully.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s