Nondeterministic timeouts connecting Airflow to Postgres server on Azure #20653
Replies: 5 comments 9 replies
-
Thanks for opening your first issue here! Be sure to follow the issue template! |
Beta Was this translation helpful? Give feedback.
-
Please do not open issues on Airlfow when the problem is with your deployment. You can open discussion instead. This is not an airflow bug - this is an issue with your deployment instability. Check your server what resources are blocking the server. Maybe you have a problem with too many copnnectio, You should generally setup pgbouncer if you use postgres so maybe that's your problem: https://airflow.apache.org/docs/apache-airflow/stable/howto/set-up-database.html?highlight=pgbouncer#setting-up-a-postgresql-database Converting it into discussion. |
Beta Was this translation helpful? Give feedback.
-
@Ethan-Henley Look at your postgresql logs. Also check the number of concurrent connections. |
Beta Was this translation helpful? Give feedback.
-
I have got same issue today, the exact same, did you find any solution please? |
Beta Was this translation helpful? Give feedback.
-
I experience this about once per month with Airflow 2.6.1 that uses an Azure PostgreSQL database. Revisiting this thread, I have just tried @potiuk's solution above, implementing the |
Beta Was this translation helpful? Give feedback.
-
Apache Airflow version
2.1.0
What happened
Noticed today that running tasks that involve connecting to a postgres database via sqlalchemy inconsistently succeed or fail due to connection timeout, apparently at random. When they fail, get logs as below.
Postgres server is running normally as per tests. Did not experience any such timeouts before the holiday and have only pushed one edit since, adding a sensor at the start of the dag where this was first noticed.
What you expected to happen
Would expect this to consistently succeed (or consistently fail, signaling a clearer problem with the server or connection).
How to reproduce
Operating System
Running this in Kubernetes on an Azure server.
Versions of Apache Airflow Providers
apache-airflow-providers-microsoft-azure==1.0.0
Deployment
Other
Deployment details
Helm version 3.0 as per https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3, uses
helm.sh/chart: airflow-2.1.0
Anything else
Log from a failed task run:
Are you willing to submit PR?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions