web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Dynamics 365 On Prem - Can not acquire Write Lock

(0) ShareShare
ReportReport
Posted on by

Hi all, in one of our enterprise customer we are receiving a very strange error. While doing all type of operations (even retrieving data ), sometimes we receive the error below:

Do you have any idea about this error ? We could find what is being tried to locked and why it fails. 

Best regards. 

Error: Could not acquire Write lock.
Error Number: 0x80040216
Error Message: Could not acquire Write lock.
Error Details: Could not acquire Write lock.
Source File: Not available
Line Number: Not available
Request URL: xxxxxxxxxx/.../WebResource.ashx
Stack Trace Info: [CrmException: Could not acquire Write lock.]
at Microsoft.Crm.CrmLockSlim..ctor(ReaderWriterLockSlim readWriteLock, LockMode lockMode, Int32 timeoutInMilliseconds, Boolean allowRecursion)
at Microsoft.Crm.Metadata.MetadataCache.GetInstance(IOrganizationContext context)
at Microsoft.Crm.Application.Controls.AppHeader..ctor()
at Microsoft.Crm.MainApplication.Application_OnPreRequestHandlerExecute(Object sender, EventArgs eventArguments)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

*This post is locked for comments

I have the same question (0)
  • Daniel at VNS Profile Picture
    on at
    RE: Dynamics 365 On Prem - Can not acquire Write Lock

    I've seen this before and believe it's occurred when there is high I/O contention on the SQL server.  

    Is this an on-prem deployment?  Is there anything about this that happens consistently that you can identify to isolate the possible triggers?

  • vladimir dj Profile Picture
    on at
    RE: Dynamics 365 On Prem - Can not acquire Write Lock

    Hi, We are encountering the same problem. we also have dyn365 (crm2016 8.2) on prem environment. What would be the right approach to identify the locks?

  • Genbil Profile Picture
    on at
    RE: Dynamics 365 On Prem - Can not acquire Write Lock

    Hi Daniel, we receive this error mostly while import solution or making high customizations.

  • Genbil Profile Picture
    on at
    RE: Dynamics 365 On Prem - Can not acquire Write Lock

    Hi Vladimir, we are still working with Microsoft support:( no progress further

  • Patrick O'Gorman Profile Picture
    166 on at
    RE: Dynamics 365 On Prem - Can not acquire Write Lock

    Same with us...we usually get it when importing a solution into D365 onprem.

  • Community Member Profile Picture
    on at
    RE: Dynamics 365 On Prem - Can not acquire Write Lock

    See if the new update helps (as with any update, try it in a lab first): support.microsoft.com/.../microsoft-dynamics-365-online-and-on-premises-update-0-1

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Dynamics 365 On Prem - Can not acquire Write Lock

    Hi

    it seems that you are a "lock" lock in your database.

    try follow this thread :

    www.exacthelp.com/.../how-to-release-or-remove-lock-on-table.html

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Dynamics 365 On Prem - Can not acquire Write Lock

    If you juste update your crm,

    Make sure you completly update your server AND your database throught the deployement manager on your server

  • DittoHead Profile Picture
    on at
    RE: Dynamics 365 On Prem - Can not acquire Write Lock

    We download updates automatically and have had 2.1 installed since 6/23/17. Yet this problem persists.

  • Community Member Profile Picture
    on at
    RE: Dynamics 365 On Prem - Can not acquire Write Lock

    Maybe not most common problem but in my case, i had to install a backend server (crm backendserverrole) and was not able to do so (could not aquire write lock) since i had the deployment manager open on frontend server. Closing deployment manager solved the problem for me.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#2
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans