Share via

Azure Cosmos DB for PostgreSQL stuck in read-only mode after DiskFull event, scaling and restore not working

Hjörtur Hjartarson 0 Reputation points
2026-02-10T14:23:37.1766667+00:00

Our cluster entered read-only mode after a DiskFull (Unplanned) event.

We have since scaled storage, but the cluster remains stuck in read-only mode.

Environment

Service: Azure Cosmos DB for PostgreSQL (Citus)

Topology: Single-node cluster

  • Region: North Europe
  • PostgreSQL database size (from SQL): ~225 GB

Actions Taken

  1. Increased node storage:
    • 256 GiB → 512 GiB
    • Later 512 GiB → 1024 GiB

Current Problems

Cluster remains in read-only mode. Despite:

Massive storage increase

DiskFull event no longer actively increasing usage

The cluster is still enforced as read-only by the platform. Inserts result in the error:

ERROR: cannot execute INSERT in a read-only transaction SQL state: 25006

On Azure UI, we see that the coordinator node has 1024 GiB storage. Azure Monitor still shows 96% of storage utilization.

How can we recover from this?

Azure Cosmos DB
Azure Cosmos DB

An Azure NoSQL database service for app development.

{count} votes

2 answers

Sort by: Most helpful
  1. Pilladi Padma Sai Manisha 5,240 Reputation points Microsoft External Staff Moderator
    2026-02-10T15:08:55.3666667+00:00

    Hi Hjörtur Hjartarson,
    Thankyou for reaching microsoft Q&A!
    after a DiskFull (Unplanned) event, Azure Cosmos DB for PostgreSQL can force the cluster into platform-level read-only mode to protect data. Increasing storage does not always clear it immediately.

    Even though your DB size is ~225 GB, Azure Monitor still showing ~96% means the actual disk (WAL/system storage) is still near the safety threshold, so the service keeps the cluster read-only. This state cannot be manually removed from SQL.

    Since scaling and restore didn’t release it, the next step is to open an Azure Support ticket and request a backend check to verify coordinator disk usage and clear the platform read-only protection if needed. Include the DiskFull event time, cluster name, and region (North Europe).

    0 comments No comments

  2. Q&A Assist
    2026-02-10T14:23:50.4533333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To recover from the read-only mode in your Azure Cosmos DB for PostgreSQL cluster after a DiskFull event, you need to ensure that there is sufficient free disk space available. Here are the steps you can take:

    1. Check Free Storage: After scaling your storage, ensure that your cluster has more than 16 GiB of free storage if your node is 256 GiB or greater, or more than 7% of free storage if your node is smaller than 256 GiB. Since your current storage is 1024 GiB, you need to have at least 16 GiB free.
    2. Set Node to Read-Write: Once you confirm that there is enough free space, you can attempt to set the node back to read-write mode. Connect to the database and execute the following command:
         SET SESSION CHARACTERISTICS AS TRANSACTION READ WRITE;
      
      This command should allow you to perform write operations again.
    3. Monitor Disk Usage: Use Azure Monitor to keep an eye on your storage utilization. Set up alerts to notify you when your storage is approaching critical levels to prevent future occurrences of this issue.
    4. Data Management: If you are still facing issues, consider deleting unnecessary data to free up space or redistributing data across worker nodes if applicable.

    If these steps do not resolve the issue, you may need to reach out to Azure support for further assistance.


    References:

    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.