Skip to content

504 Gateway Timeout when loading the grid view when there are too many past DAG runs #49800

@zachliu

Description

@zachliu

Apache Airflow version

3.0.0

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

No response

What happened?

When a DAG has too many past runs (e.g., an hourly DAG that has been running continuously for a year), the UI fails to load the grid view and returns a 504 Gateway Timeout, even though the request specifies limit=10.

I don't have an exact number to define "many past runs". But my Airflow 3 failed to load the grid view for a DAG that has over 8,000 DAG runs. After deleting ~5,000 DAG runs from the database (sadly searching & deleting DAG runs is removed from the UI in Airflow 3), the UI is able load the grid view but with a significant delay of 49.21s

What you think should happen instead?

With the proper limit, grid view should load pretty fast without 504 Gateway Timeout.

How to reproduce

Create a "minutely" dag to accumulate a few thousands of DAG runs and try to load the grid view

Operating System

LM 21.3 with docker python:3.12-slim-bookworm

Versions of Apache Airflow Providers

No response

Deployment

Other Docker-based deployment

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

Labels

area:APIAirflow's REST/HTTP APIarea:UIRelated to UI/UX. For Frontend Developers.kind:bugThis is a clearly a bugpriority:highHigh priority bug that should be patched quickly but does not require immediate new release

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions