Skip to content

PendingRollbackError: Can't reconnect until invalid transaction is rolled back. Please rollback() fully before proceeding (Background on this error) #62402

@yonus

Description

@yonus

Apache Airflow version

3.1.7

If "Other Airflow 3 version" selected, which one?

No response

What happened?

I deployed Airflow 3.1.7 using Helm chart 1.19.0.
After deployment, everything works correctly. However, after some time (not immediately), accessing the Airflow UI results in:
Internal Server Error (HTTP 500)
Restarting the api-server pods immediately resolves the issue and the UI becomes accessible again.
After some time, the issue reoccurs.

When I investigated logs of api server, I see following error logs:
PendingRollbackError: Can't reconnect until invalid transaction is rolled back. Please rollback() fully before proceeding (Background on this error)

This behavior is reproducible.

What you think should happen instead?

Airflow UI should remain accessible without requiring manual restart of API server pods.

How to reproduce

Deploy Airflow 3.1.7 with Helm chart 1.19.0
Access UI successfully
Wait for some time (hours)
Try to access UI again
Observe HTTP 500 Internal Server Error
Restart api-server pods
UI works again

Operating System

ubuntu

Versions of Apache Airflow Providers

apache-airflow-providers-amazon==9.21.0
apache-airflow-providers-cncf-kubernetes
apache-airflow-providers-common-compat>=1.13.0
apache-airflow-providers-common-sql>=1.31.0
apache-airflow-providers-airbyte==5.3.2
apache-airflow-providers-slack==9.6.2
apache-airflow-providers-trino==6.4.2
pytz>=2023.3

Deployment

Official Apache Airflow Helm Chart

Deployment details

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

    area:APIAirflow's REST/HTTP APIarea: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