Unable to connect to Azure Postgresql, timeout expired. Even restart doesn't help.

EggDev 1 Reputation point
2021-06-22T16:06:48.727+00:00

Hi all,

So in short, it seems my Azure PostgreSQL went into limbo.

I've been experiencing issues with connection after psql server encountered several errors below

  • OperationalError: SSL SYSCALL error: EOF detected
  • OperationalError: server closed connection unexpectedly

Little bit a background here, I'm using psycopg2 and sqlalchemy libraries in Python scripts to communicate with the database, along with pgAdmin for general database management. And the Python scripts run off of Azure Linux VM. I let my scripts run overnight to collect and store the data from the data sources to Azure PostgreslSQL Database that I subscribed, which might have been quite a lot of workload to the server compared to previous run. On the next day, I found the scripts had encountered the errors above and stopped the scripts from running to run again after fixing the code. I suspect this could have had the database lose its connection from client side abnormally and put the server in the limbo.

I tried restart psql from Azure Portal 3 times. Restart succeeded once out of 3 requests. I was able to connect to psql for a short moment once it was successfully restarted but it went into limbo shortly after.

So the current status:

  • Unable to connect with pgAdmin, prompting timeout expired.
    108253-image.png
  • Connection Security from Azure Portal where Firewall settings can be configured keeps loading not showing the page.
    108230-image.png
  • 'Available' Status in Azure Portal but actually not responding.
    108180-image.png
  • Was not able to communicate with Azure CLI either, tried Get-AzPostgreSqlConfiguration command hoping that I can change the 'timeout' related config.
    108207-image.png

Can you please help me to find what's the possible root cause and resolve this issue? I'm pretty new to this cloud server and database as a whole. It is very frustrating that I cannot even find what's the issue behind as the server doesn't let me get into.

Thanks in advance!

Azure Database for PostgreSQL
{count} votes

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.