Consistent timeouts connecting to Azure Cosmos DB for PostgreSQL Cluster

John Kendall 0 Reputation points
2025-12-09T23:01:43.2466667+00:00

All of a sudden our application is having consistent connection timeouts connecting to our Azure Cosmos DB for PostgreSQL Cluster.

We have not had any change in load or configuration.

I have performed many of the basic troubleshooting measures, restart cluster, restart application, check available resources on the cluster.

Is there any outage or service disruption on the Azure end?

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 590 Reputation points Microsoft External Staff Moderator
    2025-12-10T00:06:04.2533333+00:00

    Hi John Kendall,
    Thank you for reaching out to Microsoft QA!
    it looks like you’re experiencing some frustrating connection timeouts with your Azure Cosmos DB for PostgreSQL Cluster. It's good that you've already tried restarting and checking resources on your cluster those are solid first steps.
    Verify Azure Service Health: Log in to the Azure portal and check Service Health for any active incidents or maintenance affecting Cosmos DB for PostgreSQL. Also review the public status page. If nothing is listed, it’s unlikely to be a platform-wide outage.Network and Firewall:

    Make sure your application’s outbound IPs are allowed in the cluster firewall. Confirm required ports (5432 for PostgreSQL, 6432 for PgBouncer) are open. If you use private endpoints, check DNS resolution and NSG rules.

    Connection String and SSL:

    Double-check the connection string for the correct FQDN, database name, and SSL settings. Validate that your client library supports SSL.

    Cluster Metrics:

    In the Azure portal, review CPU, memory, and connection count metrics. If these look normal, the issue is likely on the client side.

    Retry Logic :

    Implement exponential backoff for transient errors. This helps during brief service hiccups.

    If Service Health shows no outage and metrics look fine, common causes include firewall or NSG changes, DNS issues with private endpoints, or resource exhaustion on the application side (thread pool or sockets).
    References:

    Azure Service Health Dashboard

    Monitor CPU usage in Azure PostgreSQL

    Troubleshoot connection issues to Azure Cosmos DB for PostgreSQL

    Hope this helps you get to the bottom of the issue! Let me know if you have any further issues.

    0 comments No comments

  2. SUNOJ KUMAR YELURU 17,326 Reputation points MVP Volunteer Moderator
    2025-12-11T06:42:08.7+00:00

    Hello @John Kendall

    If your application is experiencing consistent connection timeouts to Azure Cosmos DB for PostgreSQL, there are several potential causes to consider. First, check for any firewall misconfigurations, as both the coordinator node and client firewalls must allow connections from your application. Ensure that the server firewall is configured to accept connections from your client, including any proxy servers or gateways.

    Additionally, verify that your connection string is correct and that you have not exceeded the connection limit for your cluster.


    If the Answer is helpful, please click Accept Answer and Up-Vote 👍, so that this can be beneficial to other community members.

    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.