An Azure managed PostgreSQL database service for app development and deployment.
Hello Vish Talreja ,
Greetings! Thanks for raising this question in Q&A forum.
The reason this is happening is that your Azure PostgreSQL Flexible Server encountered an internal WAL (Write-Ahead Logging) service failure during startup. This caused the server to get stuck in a "Starting..." state where Azure's control plane can no longer send stop, restart, or delete commands to it because all those operations require the server to first be in an "Active" state. Essentially, the server is caught in a deadlock between failing to start and not being stoppable.
Since you cannot resolve this from the portal or CLI on your own, here is what you should do:
Step 1: Check Azure Service Health
Go to the Azure Portal and search for "Service Health". Filter by your region and check if there are any active incidents related to Azure Database for PostgreSQL. If there is a platform-level issue, it may resolve on its own.
Step 2: Wait a Short While and Retry
Sometimes Azure's backend eventually times out the stuck operation and resets the server state. Wait about 15–20 more minutes, then try running this CLI command again:
az postgres flexible-server stop --resource-group <your-rg> --name yyy-prod-db
Step 3: Raise an Azure Support Ticket (Most Important Step)
Since this is a production server and involves an internal platform operation (HandleWalServiceFailureManagementOperation), you need Microsoft's backend team to manually intervene. Here's how:
- Go to the Azure Portal
- Click "Help + Support" from the left menu
- Click "Create a support request"
- Select Issue type: Technical
- Service: Azure Database for PostgreSQL
- Problem type: Server unavailable / stuck in Starting state
- Severity: Set to "A - Critical" since it's a production database
Make sure to include the full error message and your server name (yyy-prod-db) in the ticket description.
Step 4: While Waiting, Assess Your Recovery Options
If you have Point-in-Time Restore (PITR) enabled, you can restore your database to a new server as a workaround to get your application back online while the stuck server is being handled. Run:
az postgres flexible-server geo-restore \
--resource-group <your-rg> \
--name yyy-prod-db-restored \
--source-server yyy-prod-db \
--restore-time <timestamp>
This will at least unblock your production workload while Microsoft resolves the stuck state on the original server.
Unfortunately, there is no self-service way to force-delete or force-stop a server stuck in this specific state — it requires a backend platform-level fix from the Azure support team.
If this answer helps you kindly accept the answer which will help others who have similar questions.
Best Regards,
Jerald Felix.