Closed hpereira98 closed 8 months ago
@hpereira98 it's not timing out after 1 second, the relevant error is psycopg2.OperationalError: SSL connection has been closed unexpectedly
.
This indicates that your RDS instance is closing the connection for some reason.
After looking online, it's probably related to a lack of resources on the RDS, or some other configuration error like what this person on Reddit found (related to an invalid init_query
).
Yeah, this was actually an issue with our RDS database, where we had a parameter group setting idle_in_transaction_session_timeout
to a value under 1s.
Thanks for your help!
Checks
User-Community Airflow Helm Chart
.Chart Version
8.8.0
Kubernetes Version
Helm Version
Description
We're trying to upgrade Airflow from version
1.10.12
to2.7.3
. Locally, on a Minikube cluster and a local PostgreSQL database, the upgrade works as expected.However, when trying to deploy it in a remote K8s cluster, connected to an AWS RDS database (PostgreSQL 16.2), the deployment does not work as the database migrations are timing out after 1 second.
After taking a look at the code, we could see that
check_migrations
is set by default to 1. We find it weird that no one has lifted this issue before - since the User-Community Airflow Chart does not allow us to configure this timeout value - as opposed to the official chart, where we can defineimages. migrationsWaitTimeout
.We've also tried configuring
properties: "?sslmode=require"
in theexternalDatabase
configs, but the same issue is occurring.The issues doesn't seem to be related to the database connection, as the
check-db
step is running correctly, andcheck_migrations
is correctly fetching the latest applied migration (da3f683c3a5a
).Can anyone help us understand this issue?
Relevant Logs
Custom Helm Values