Website not Connecting to Database after Subscription Upgrade to Pay as you Go

Eniola Adeyemi 0 Reputation points
2026-09-25T17:20:57.74+00:00

My Database cannot be reached after my credit for the 1st time subscription expired. i upgraded to Pay as you go, all resource group are active but my website cannot still connect to the database. Any thoughts on what else i need to do. i use Postgres

Azure Database for PostgreSQL
0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-09-25T17:21:13.7566667+00:00

    After upgrading, the subscription can be active while PostgreSQL connectivity is still blocked by configuration or a service-side issue. For PostgreSQL, the most common causes are firewall rules, incorrect connection settings, SSL requirements, or a transient service problem.

    1. Verify the PostgreSQL server is reachable from the app host.
      • Check that the server firewall allows the website’s outbound IP addresses.
      • If there are client-side firewalls or NSGs in the path, make sure outbound port 5432 is allowed.
    2. Recheck the connection string used by the website.
      • Confirm the server name, username, password, database name, and port are correct.
      • For Azure Cosmos DB for PostgreSQL, the predefined database name is citus.
    3. If the database is Azure Database for PostgreSQL, make sure SSL is enabled in the connection string.
      • Add Ssl Mode=Require;.
      • If full certificate validation is needed, also set Trust Server Certificate=false and provide the root certificate path.
    4. Check whether this is a transient platform issue.
      • Review the Microsoft Azure Service Dashboard for outages.
      • If the app lost connectivity only briefly, implement retry logic because transient PostgreSQL connection interruptions can occur during maintenance or failover.
    5. Test firewall isolation carefully.
      • For temporary testing only, a broad firewall rule from 0.0.0.0 to 255.255.255.255 can confirm whether firewall configuration is the cause. This opens access broadly, so remove it immediately after testing and replace it with a limited rule.
    6. If the problem started exactly when the subscription expired and upgrade completed, and all settings are already correct, open an Azure support request.
      • Subscription reactivation does not guarantee that a database-side issue has cleared.
      • Similar PostgreSQL cases required Microsoft intervention when the underlying VM agent or upgrade state was unhealthy.

    If a quick end-to-end check is needed, use this order:

    1. Confirm the subscription is active.
    2. Confirm the PostgreSQL server itself is in a healthy/ready state.
    3. Validate firewall rules for the website outbound IPs.
    4. Validate port 5432.
    5. Validate the exact connection string and SSL settings.
    6. Check Azure service health.
    7. If still failing, create a support request.

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

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.