PostgreSQL Flexible Server in restart for extended period

Carl Peterson 0 Reputation points
2024-05-31T18:01:56.62+00:00

I have a flexible server database that has been restarting for nearly four hours. It usually takes about 10 minutes to cycle the server. It shows some intermittent availability and response to queries, but it still has the status alert and doesn't show any CPU, Memory, or Storage metrics, The server needs to be scaled up, but it won't let me deploy the new configuration...because it's stuck in restart.

Azure Database for PostgreSQL
{count} votes

2 answers

Sort by: Most helpful
  1. RahulRandive 9,976 Reputation points
    2024-05-31T18:14:25.0633333+00:00

    Hi Carl Peterson,

    Glad to hear that server back online.

    Yes, if the server is in a restart state, you may need to wait for some time for it to come online. However, if it takes longer than expected, you should open a support ticket to check the server's health.

    What causes long recovery on Azure Database for PostgreSQL- Recent checkpoints are critical for fast server recovery. Once a restart happens, either it was a new instance (failover to healthy instance) or same instance (in-place restart) will connect to disk that has all logs, all WAL logs after the last successful checkpoint need to be applied to the data pages before the server starts to accept connections again.

    Thank You!

    0 comments No comments

  2. GeethaThatipatri-MSFT 29,492 Reputation points Microsoft Employee
    2024-05-31T18:56:37.96+00:00

    @Carl Peterson I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer .

    Issue You are facing issues with a PostgreSQL Flexible Server database that has been restarting for an extended period. The server needs to be scaled up, but it won't let them deploy the new configuration because it's stuck in restart

    Solution As you mentioned Restart took some time and you were able to access the server fine.

    However, if the issue ochers in future as the server is still stuck in the "Restarting" state, try restarting it again using the Azure portal or Azure CLI. or file a support case with us.

    Regards

    Geetha

    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.