Azure PostgreSQL server unreachable – app failing with OperationalError (Tracking ID: e521870a-a610-410d-a970-b5b3e05e6e50)

Tom Rye 0 Reputation points
2025-06-14T21:44:39.98+00:00

Summary: My Django web app hosted on Azure App Service has worked flawlessly for months but suddenly started returning 500 errors on login. I have made no code changes.

On investigation, I've confirmed the app can no longer connect to the Azure PostgreSQL Flexible Server. Attempts to restart the DB result in an error.

Error on database connection (captured via SSH inside App Service):

django.db.utils.OperationalError: could not connect to server: Connection refused

Is the server running on host "feedback-server.postgres.database.azure.com" (10.0.2.4) and accepting TCP/IP connections on port 5432?

Additional context:

  • App: fastfeedback (Django, running in App Service on Linux)
  • DB server: feedback-server.postgres.database.azure.com
  • I attempted to restart the PostgreSQL server but received:

Error occurred restarting the server feedback-server. An unexpected error occurred while processing the request.

Tracking ID: e521870a-a610-410d-a970-b5b3e05e6e50

  1. The app loads static files and pages fine — only POST actions requiring DB access fail.
  2. python manage.py dbshell from inside the SSH shell also fails to connect.

Request:

Can someone from Microsoft support please investigate the server unavailability?

This is blocking all user logins for my live web application.

Azure Database for PostgreSQL
0 comments No comments
{count} votes

1 answer

Sort by: Newest
  1. Chiugo Okpala 1,825 Reputation points MVP
    2025-06-15T12:08:33.3566667+00:00

    @Tom Rye welcome to the Microsoft Q&A community.

    Here are a few things you might want to check:

    Azure Service Health – Check if there are any ongoing outages or maintenance affecting Azure Database for PostgreSQL.

    Firewall & Networking – Ensure that your database server is still allowing connections from your App Service. Sometimes, firewall rules or VNET configurations change unexpectedly.

    Server Status – If restarting the server fails, it could indicate an underlying issue with Azure's infrastructure. You might need to raise a support ticket with Microsoft.

    Connection Security Settings – Verify that your database settings haven't changed, such as "Allow access to Azure services" being disabled.

    Logs & Metrics – Check Azure Monitor logs for any unusual activity or errors related to your database.

    You can find a discussion on a similar issue here, which might provide additional insights. If the problem persists, I recommend reaching out to Azure Support directly with your tracking ID for further investigation.

    I hope these helps. Let me know if you have any further questions or need additional assistance.

    Also if these answers your query, do click the "Upvote" and click "Accept the answer" of which might be beneficial to other community members reading this thread.

    User's image


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.