I tried to scale a flexible SQL server, it failed, and now the server is in an updating state and I can't start it. What do i do?

green-msl 0 Reputation points
2025-12-02T22:25:39.8266667+00:00

I have this Azure Database for MySQL flexible server that was nearing it's CPU capacity, I tried to rescale it, the scaling failed with a generic error.

"statusMessage": "{\"status\":\"Failed\",\"error\":{\"code\":\"ResourceOperationFailure\",\"message\":\"The resource operation completed with terminal provisioning state 'Failed'.\",\"details\":[{\"code\":\"InternalServerError\",\"message\":\"An unexpected error occured while processing the request. Tracking ID: '958f6ebf-9513-4aae-ae71-518a22d93d6b'\"}]}}"


Now the database says it's stuck saying " the server is currently in an updating state ", and has been for about 3/4 hours.

What should I do to get my server back?

Azure Database for MySQL
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-12-02T22:25:48.6733333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To resolve the issue with your Azure Database for MySQL flexible server that is stuck in an updating state after a failed scaling operation, you can try the following steps:

    1. Wait for a while: Sometimes, the server may take longer to recover from an update or scaling operation. If it has only been a few hours, it might be worth waiting a bit longer to see if it resolves itself.
    2. Restart the server: If the server remains in the updating state for an extended period, you can attempt to restart it. You can do this using the Azure portal or Azure CLI. To restart using the Azure CLI, you can run the following command:
         az mysql flexible-server restart --resource-group <your-resource-group> --name <your-server-name>
      
      Replace <your-resource-group> and <your-server-name> with your actual resource group and server name.
    3. Check Azure Service Health: Visit the Azure Service Health dashboard to check if there are any ongoing issues or outages that might be affecting your server.
    4. Contact Azure Support: If the server does not recover after attempting a restart or if you continue to see the updating state, it may be necessary to contact Azure Support for further assistance. Provide them with the tracking ID from the error message for better troubleshooting.

    Following these steps should help you get your server back to a functional state.

    0 comments No comments

  2. Pilladi Padma Sai Manisha 500 Reputation points Microsoft External Staff Moderator
    2025-12-02T23:23:26.0433333+00:00

    Hi green-msl,
    Thank you for reaching out to Microsoft QA!
    it sounds like you're dealing with a pretty frustrating situation with your Azure Database for MySQL flexible server. Here’s what you can do to try and resolve the issue:

    Verify backend state (do not retry while not stable):

    az mysql flexible-server show \
      -g <resourceGroup> -n <serverName> \
      --query "{userVisibleState:state, provisioningState:properties.provisioningState}"
    

    If provisioningState is not Succeeded, wait; most mutations are blocked until the prior operation completes.

    Check Activity Log for the failed scale and correlation IDs\ Portal > Monitor > Activity log >filter to the server/resource group.\ Confirm the failed operation entry and note the correlation/operation ID and error text (SKU/zone/capacity/lock).

    Remove non‑essential resource locks (if any):

    az resource lock list \
      --resource-group <resourceGroup> \
      --resource <serverName> \
      --resource-type "Microsoft.DBforMySQL/flexibleServers"
    # If a non-essential lock exists:
    az resource lock delete --ids <lockResourceId>
    
    

    Let Azure finish, then perform a safe wait and a single restart (only when stable):

    # Defensive wait until the control-plane reports the resource updated
    az mysql flexible-server wait \
      -g <resourceGroup> -n <serverName> --updated
    # Restart once to clear transient state (skip if provisioningState ≠ Succeeded)
    az mysql flexible-server restartaz mysql flexible-server restart \
    

    Reapply scaling in smaller, supported steps:

    # Example: move to a known-available SKU in the region
    az mysql flexible-server update \
      -g <resourceGroup> -n <serverName> \
    

    Avoid jumping multiple sizes/tiers at once. If currently on a burstable tier, consider moving to General Purpose or Memory Optimized before further scaling. Validate SKU availability in the region first.

    Fast service restore/cutover if the server won’t exit updating promptly

    # Point-in-time restore (PITR) to a new flexible server
    az mysql flexible-server restore \
      --name <newServerName> \
      -g <resourceGroup> \
      --source-server <serverName> \
    
    

    Then update application connection strings or DNS to the new server.

    Prevent repeat incidents:

    Avoid scaling during maintenance windows; set a custom window that suits your traffic.

    Scale incrementally and confirm SKU availability in-region. Monitor CPU, IOPS, and connections to justify the next tier early.

    Hope this helps get your server back up and running! If you have any more questions or need further assistance, feel free to ask!

    0 comments No comments

Your answer

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