Loading

Proactive Alert Monitoring: Rowlock Timeout Errors

게시 일자: Aug 30, 2023
상세 설명

Rowlock Timeout Error occurs when a user or functions attempts to modify an already locked record time out. Salesforce will place a lock on records to prevent another operation from updating it at the same time and causing inconsistencies in the data. Any given transaction can wait for 10 seconds for the lock to be released before it will time out. 

The Signature Success plan’s Proactive Monitoring product will monitor for, and alert you to, sustained volumes of these errors. This article outlines some scenarios to help you investigate should you receive an alert from Proactive Monitoring related to this error type. In addition, on the Salesforce Help site Designated contacts and above can see your realtime metrics, alerts & more.

If you receive the following error message, your organization may experience performance issues and possible service disruptions

Full error message text:

  • UNABLE_TO_LOCK_ROW

 

Causes:

Records are commonly prevented from unlocking under one of the below scenarios:

  • Multiple email-to-case updates timing out
  • API/Apex triggers failing
  • Bulk API Operations
  • Parent/child relationships contributing to data skew
솔루션


Here are some common practices & resources that may help to resolve this error.
 

Multiple email-to-case updates timing out

Everything from marketing campaigns to simple email sends from multiple users can cause record locks on email message objects. Implementing a consistent review schedule of email functionality and postmortem analysis can help mitigate future issues within your organization.

 

API/Apex triggers failing

Custom triggers concurrently updating multiple or duplicated records can cause immediate record locks. Always reference best practices provided in our Apex Developer Guide to optimize your queries, and if the issue is specific to a single user, enable debug logs to help identify the specific process or object attributing to the problem.

 

Bulk API Operations

Inserting or updating records through the bulk API can cause multiple updates on the same parent record all at once, because the batches are procesed in parallel (i.e. two batches processing at the same time may contain records pointing to the same parent record, resulting in one of the batches experiencing rowlocks whilst the other completes). You can mitigate this by reducing the batch size, processing records in Serial mode & sorting records based on their parent record.

 

Parent-Child Relationship

Every time you edit the child record, the parent will also be locked. The more child records you have, the more likely the parent is to be locked. It is best practice to reduce the number of child records attached to a single parent. Regularly review your organization's record relationships to avoid data skew.



Additional resources

 

AppExchange resources


Help and Developer resources

Knowledge 기사 번호

000384162

 
로드 중
Salesforce Help | Article