Why retracting solutions takes so long?

Luiz Gouvea 61 Reputation points
2020-10-24T04:33:13.667+00:00

Good evening, on my farm the average time to retract 5 solutions on SharePoint 2019 takes like 20/25 minutes. Is there a way to improve this?

Microsoft 365 and Office | SharePoint Server | For business
{count} votes

Accepted answer
  1. trevorseward 11,711 Reputation points
    2020-10-25T01:34:39.397+00:00

    This can largely vary, but first off make sure you're running a farm that has been patched within the last few month's of Public Updates -- there were some glaring issues until recently with WSP deployment.

    Retraction takes time depending on what the code as part of the retraction process needs to do, i.e. code that has to also delete a custom service application or instance is going to take longer than one that doesn't. The other thing is how many servers in the farm. And then we get down to how the farm members and SQL server are performing.

    Unfortunately via your post there isn't enough information to help you determine why it is taking so long but diagnosing that is likely something that can only be done by working directly with your farm, I don't think this is going to be an issue that ULS will tell us about right away.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. MichaelHan-MSFT 18,126 Reputation points
    2020-10-26T07:11:09.687+00:00

    Hi @Luiz Gouvea ,

    It's normal that retracting a deployed SharePoint solution from the farm entirely would take some time.

    Instead of retracting solution from Central Admin, you could use powershell command to retract solutions directly:

    Uninstall-SPSolution -Identity mySolution.wsp -allwebapplications  
    

    Reference:

    https://learn.microsoft.com/en-us/powershell/module/sharepoint-server/uninstall-spsolution?view=sharepoint-ps


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. sadomovalex 3,636 Reputation points
    2020-10-28T15:26:29.207+00:00

    retract is done one by one by timer service. Since you try to retract 5 wsps it may take this time. Here is article which describes how solution deployment works internally (retraction work in similar way but in other direction).

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.