What problems lead me to message "Failed to save the changes because the database could not be locked. Please wait a while and try again."?

Hello,

When I called the change record API, I received the message, “Failed to save the changes because the database could not be locked. Please wait a while and try again.”.

I want to know all cases that would send me that message. Can you help me?

Thanks,

Hi Tan,

It is not limited, but this error occurs for the following reasons.

When a record is updating, as mutual exclusion, a selected part of the record database will temporarily be in lock status.

If the same part of the database that is in a lock status needs to be updated, the subsequent process will be in a wait status.

Then, if the first process takes too much time and the subsequent process in a wait status passes the timeout value, the error you mentioned occurs.

As mentioned in the beginning, the cause is just one possibility, but mostly it is due to too many processes simultaneously.

The following are some ways to avoid this error.

Reduce the number of fields and registered records in each app so that it doesn’t take too long to process, such as record updates.

Split API requests and avoid duplication of processing time

Simplify your app settings, such as setting permissions, with complex settings, etc.

Records that could not be updated with an error should be left for retry processing and then retry at a time when other update processing and time do not overlap.

I hope this helps.