Re: Salesforce Sync Error: UNABLE_TO_LOCK_ROW

Valerie_Armstro
Level 10 - Champion Alumni

Salesforce Sync Error: UNABLE_TO_LOCK_ROW

This morning, I had a Marketo notifcation that Marketo was unable to update Lead in Salesforce.  The error details were: UNABLE_TO_LOCK_ROW: unable to obtain exclusive access to this record.  Any ideas on what may have thrown this error?

Thanks, Community!
Tags (1)
18 REPLIES 18
Anonymous
Not applicable

Re: Salesforce Sync Error: UNABLE_TO_LOCK_ROW

Ohh, same stuff going on for the last week or so. Just subscribing to hear if there's an answer.
Kenny_Elkington
Marketo Employee

Re: Salesforce Sync Error: UNABLE_TO_LOCK_ROW

Hey Val and Elena,

This indicates that when attempting to write to a record it is already being written or locked by another record.  You can find more extensive explanations here: http://salesforce.stackexchange.com/questions/27093/salesforce-parent-locking-unable-to-lock-row https://developer.salesforce.com/blogs/engineering/2013/04/managing-lookup-skew-to-avoid-record-lock-exceptions.html

Marketo will retry an operation a few times if this keeps being received, but will fail and move on if it happens too many times.  If these have recently become common, you might want to look into any new API integrations to SFDC which you've deployed or any new AppExchange packages with your SFDC Admin, tosee if you might be able to tune it o avoid these collisions.
Valerie_Armstro
Level 10 - Champion Alumni

Re: Salesforce Sync Error: UNABLE_TO_LOCK_ROW

Hi Kenny,

Thank you for your reply. This is the first time we received an error like this.  I checked in with our SFDC Admin and no new AppExchange apps or API integrations have been deployed in the last two weeks. Reading through the articles you sent, it seems like this can happen due to updates with custom objects and lookup fields, could you expand on this?  Also, are there any other examples of when Salesforce would throw this error? 

Thanks again!
-Val
Dory_Viscoglio
Level 10

Re: Salesforce Sync Error: UNABLE_TO_LOCK_ROW

Weird, we just got this error (for the first time) today as well! Kenny, is it possible that something has recently changed in Marketo or SFDC which would cause this error? Just seems a little too convenient that it's happened to several people just recently. 
Valerie_Armstro
Level 10 - Champion Alumni

Re: Salesforce Sync Error: UNABLE_TO_LOCK_ROW

I'm starting to wonder if this may have something to do with the recent Salesforce performance issues.  Our instance has had performance degradations yesterday and Monday.
Kenny_Elkington
Marketo Employee

Re: Salesforce Sync Error: UNABLE_TO_LOCK_ROW

Hi Dory,

It's extremely rare that Marketo would make concurrent attempts to access the same record or a record and its parent at the same time, so I don't belive that this could be a result of something changing on the Marketo side.  If you have seen performance degaradations in SFDC it's possible that slower database transactions would make this exception more common, but it's really a question that I would take to Salesforce, as we don't really have the level of visibility from the Marketo side to make conclusive judgments regarding the cause.

Dory_Viscoglio
Level 10

Re: Salesforce Sync Error: UNABLE_TO_LOCK_ROW

Thanks Kenny. I'm sending this over to our SFDC developer to see if there's anything going on on that end.
Valerie_Armstro
Level 10 - Champion Alumni

Re: Salesforce Sync Error: UNABLE_TO_LOCK_ROW

Be sure to post back if you and your SFDC dev find anything, Dory! I'm still searching for an answer to this.  🙂 
Anonymous
Not applicable

Re: Salesforce Sync Error: UNABLE_TO_LOCK_ROW

Weird...  I just got this same error this morning.   Subscribing to see if you find a fix.