Can't figure out why your SAP Commerce catalog synchronization has stalled?
This guide is your friendly roadmap to tackling those tricky synchronization jobs and cronjob issues.
We'll walk you through simple diagnostic steps, key configurations, and smart performance tips to make sure your product data moves smoothly.
These are the immediate actions you should take when a synchronization job fails or stalls:
Verify the Cronjob Status: Always check the current synchronization status. If a cronjob runs for hours without noticeable progress, manually set its status to ABORTED to force-stop it.
NEW, CONTINUED, or RUNNING statuses. There are some points to consider when starting an A catalog synchronization job:
if another B.fullSync == true sync job is running --> failure ("Cannot perform partial sync cron job when there is other full sync cron job running")
if A.fullSync == true, and any other sync is running --> failure ("Cannot perform full sync cron job when others are running")
if A.fullSync == false, and no other sync is running --> success
if A.fullSync == false, and there is another sync B with B.fullSync == false is running -> compare schedules:
overlap --> failure ("Cannot perform partial sync when there are items overlapping from other running cron job")
The number of items exceeds the limit (catalog.sync.partial.max.items default value set to 500) --> failure ("Cannot perform partial sync when number of items to sync exceed the limit")
no overlap --> success
Analyze Synchronization Logs:
Look for critical messages in your logs, taking always in consideration the Cronjob ID to analyze the error.
Examine the configuration phase output to confirm how many items are scheduled and if this phase completes successfully. If you notice that there is no information about finished configuration phase you should be looking at your configured Root types.
Review the synchronization phase flow for the number of passes, items processed, and any reported errors. If the errors raised, does not contain important information about the data sync, is necessary to enable Debug level logs.
To capture the detailed information needed to pinpoint the root cause of an error, temporarily adjust your logging configuration.
Enable DEBUG Logs for Synchronization: Turn on DEBUG level logging for the synchronization process to trace detailed execution steps.
log4j2.logger.synchronization.name = de.hybris.platform.catalog.jalo.synchronization
log4j2.logger.synchronization.level = debug
log4j2.logger.synchronization.appenderRef.stdout.ref = STDOUT
Tip: If exceptions are "swallowed," enable stack trace logging: synchronization.itemcopycreator.stacktraces=true.
Crucial Note: Disable DEBUG logging immediately after investigation to prevent performance degradation from excessive log file generation.
Identify Problematic Items: If an error includes a PK (Primary Key), use the HAC PK Analyzer tool to quickly identify the Typecode (the item type) of the problematic data.
Analyze Sync Media Dumps: If the synchronization finishes with errors or unfinished items, analyze the synchronization media dumps to list exactly which items failed.
Focus on known structural and performance bottlenecks, particularly involving data model constraints and database interaction.
Review ItemSyncTimestamps Table: This table tracks the sync status of item pairs. Query it for bad data:
Check for targetitem is null or targetitem equals sourceitem (indicating a loop).
If corruption is suspected, enable the forceUpdate flag to force item recreation.
Last Resort: If corruption is severe, clean the ItemSyncTimestamps for the problematic versions. The next sync will run as a complete initial sync.
Mandatory Attributes: If synchronization fails due to a MandatoryAttributesValidator error, it means an item has a null value for an attribute defined as mandatory. This often happens after an attribute's definition is changed from optional to mandatory. Fix the existing source data to provide the missing value.
Deadlocks: The HybrisOptimisticLockingFailureException and related deadlocks are a common sign of concurrent modification during the synchronization process. While locking is a normal part of processing, excessive locking hurts performance.
In most cases, reducing the number of sync workers (via catalog.sync.workers) can resolve the issue by lowering concurrency, although overall performance may drop slightly.
Crucial Diagnostic Step: Temporarily set the number of sync threads to 1 to see if the sync completes or progresses without deadlocks. This isolates the problem, confirming if concurrency is the root cause.
Here is a quick reference list of essential Knowledge Base Articles (KBAs) that explain the points mentioned in more detail:
You now have a complete next action plan for future sync situations!
Just follow this step-by-step guide: check your logs, apply a specific fix, and your catalog items will move smoothly and fast from staging to your live site 😄
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 16 | |
| 13 | |
| 11 | |
| 9 | |
| 9 | |
| 9 | |
| 9 | |
| 9 | |
| 7 | |
| 7 |