The Sync That Silently Stopped
Your Marketo instance syncs to Salesforce every 5 minutes. On Monday, a rep reports that 1,200 leads created in Marketo over the weekend never appeared in Salesforce. You check the sync status: it shows 'Active.' The sync errors log shows 40 consecutive failures, all reading 'UNABLE_TO_LOCK_ROW' on the same object. Your team recently deployed a nightly Apex job that runs a mass update on all contacts at 2:00 AM and takes about 90 minutes. Weekend volume was normal. The leads in question are all in a campaign with a smart campaign that has 'Sync to CRM' turned on and an 'Interesting Moment' flow step. No field mappings changed in the last 30 days.
1. What is the most likely root cause, and what is the first thing you should check to confirm it?
Read the worked answer
Root cause hypothesis: Row-lock contention, not a configuration error. UNABLE_TO_LOCK_ROW means Salesforce could not acquire a lock on a record because another process held it. The nightly Apex job updating all contacts overlaps with the sync window and holds locks that the Marketo connector needs.
Confirmation steps:
- Compare timestamps of the 40 failures against the 2:00–3:30 AM Apex job window. If they cluster there, the contention is confirmed.
- Check Salesforce Setup > Apex Jobs / Scheduled Jobs to confirm the job's actual runtime and whether it ran longer than usual over the weekend.
- Verify the Marketo sync user's permissions and whether the failures are isolated to contacts (the object the Apex job touches) versus leads.
Key reasoning: The sync showing 'Active' and unchanged field mappings rule out setup problems. Volume was normal, so it is not a bulk-processing limit. The error text itself points at locking, and the only recent change was a job that mass-updates the same object.
2. The sync has been failing for 40 cycles. What should you do about the 1,200 unsynced leads, and what is the risk of just waiting for the next cycle?
Read the worked answer
Do not assume the next cycle will catch up automatically. After repeated failures, the connector may have backed off or queued the records, and some batches may have been dropped from the retry queue depending on failure handling. Waiting risks silent data loss and stale CRM data for sales.
Recommended actions:
- Reschedule or throttle the Apex job so it does not overlap the sync window (e.g., move it outside business-critical sync hours, or batch it to reduce lock duration).
- Manually re-trigger sync for the affected leads: use the 'Sync Person to Microsoft Dynamics/Salesforce' flow action in a one-time smart campaign targeting the 1,200 leads, or use the sync status admin tools to requeue.
- Reconcile after the fix: export the 1,200 Marketo IDs, query Salesforce for those emails, and confirm all now exist.
- Confirm with the rep that the records now appear.
Risk of waiting: Leads may be permanently missed if the connector dropped them, and reps may create duplicates in Salesforce manually, compounding the problem.