Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Dynamics 365 On Prem - Can not acquire Write Lock

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

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

    In a recent case i have seen this when the CPU is utilized 100% by some process other than Dynamics. Example Antimalware scanning every file getting copied to local server during setup.

  • Community Member Profile Picture
    Community Member Microsoft Employee 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.

  • DittoHead Profile Picture
    DittoHead 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.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee 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

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee 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

  • Community Member Profile Picture
    Community Member Microsoft Employee 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

  • Patrick O'Gorman Profile Picture
    Patrick O'Gorman 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.

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

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

  • Genbil Profile Picture
    Genbil 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.

  • vladimir dj Profile Picture
    vladimir dj 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?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans