Skip to content

Airflow 3.2.0 opens too many meta DB connections #65010

@rbayer666

Description

@rbayer666

Under which category would you file this issue?

Airflow Core

Apache Airflow version

3.2.0

What happened and how to reproduce it?

** Issue Description **
After upgrading from Airflow 3.1.8 to 3.2.0 without changing the configuration we encountered the problem that the meta database (running on PostgreSQL) stops accepting connections. Or, if we increase the allowed connections on the database, the sql achemy pool fills up.

The sql_alchemy settings are the default ones:

  • sql_alchemy_pool_enabled = True
  • sql_alchemy_pool_size = 5
  • sql_alchemy_max_overflow = 10

The allowed parallel database connections on the postgresql is set to 100.

We have 1x api server, 1 x scheduler, 1 x triggerer.

Increasing the sql_alchemy pool and the postgresql connections does not solve the issue - it just takes more time until the connection pool is filled up or the database stops accepting connections.

It looks like the database connections are not properly closed and left open. Over time the connections sum up.

What you think should happen instead?

All database connections should be closed when they are no longer needed.

Operating System

Debian GNU/Linux 12 (bookworm)

Deployment

Docker-Compose

Apache Airflow Provider(s)

No response

Versions of Apache Airflow Providers

No response

Official Helm Chart version

Not Applicable

Kubernetes Version

v1.31.13

Helm Chart configuration

No response

Docker Image customizations

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    affected_version:3.2Use for reporting issues with 3.2area:MetaDBMeta Database related issues.area:corekind:bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yet

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions