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.
- 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!!!
Categories: How-to articles