Skip to content

API server in crash-loop with PYTHONASYNCIODEBUG=1 #53105

Description

@m1racoli

Apache Airflow version

3.0.2

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

No response

What happened?

When setting PYTHONASYNCIODEBUG=1 the API server isn't able to start and its children are in a crash-loop.

What you think should happen instead?

The API should have started up just fine.

How to reproduce

Set .env file to

PYTHONASYNCIODEBUG=1

and Dockerfile to

FROM astrocrpublic.azurecr.io/runtime:3.0-4

Using the astro CLI, run astro dev start and the API server will not be able to serve requests.

Operating System

Debian GNU/Linux 12 (bookworm)

Versions of Apache Airflow Providers

apache-airflow-providers-celery==3.11.0
apache-airflow-providers-common-compat==1.7.0
apache-airflow-providers-common-io==1.6.0
apache-airflow-providers-common-sql==1.27.1
apache-airflow-providers-elasticsearch==6.3.0
apache-airflow-providers-mysql==6.3.0
apache-airflow-providers-openlineage==2.3.0
apache-airflow-providers-postgres==6.2.0
apache-airflow-providers-smtp==2.1.0
apache-airflow-providers-standard==1.2.0

Deployment

Docker-Compose

Deployment details

No response

Anything else?

API server logs

[2025-07-09T19:23:15.640+0000] {runners.py:118} WARNING - Executing <Task pending name='Task-1' coro=<Server.serve() running at /usr/local/lib/python3.12/site-packages/uvicorn/server.py:70> wait_for=<Future pending cb=[Task.task_wakeup()] created at /usr/local/lib/python3.12/asyncio/locks.py:209> cb=[run_until_complete.<locals>.done_cb()] created at /usr/local/lib/python3.12/asyncio/runners.py:100> took 0.628 seconds
INFO:     Application startup complete.
INFO:     Waiting for child process [184]
INFO:     Child process [184] died
/usr/local/lib/python3.12/site-packages/airflow/configuration.py:858 DeprecationWarning: The secret_key option in [webserver] has been moved to the secret_key option in [api] - the old setting has been used, but please update your config.
[2025-07-09T19:23:16.816+0000] {plugin.py:125} WARNING - Astro managed secrets backend is disabled
[2025-07-09T19:23:16.880+0000] {providers_manager.py:953} INFO - The hook_class 'airflow.providers.standard.hooks.filesystem.FSHook' is not fully initialized (UI widgets will be missing), because the 'flask_appbuilder' package is not installed, however it is not required for Airflow components to work
[2025-07-09T19:23:16.880+0000] {providers_manager.py:953} INFO - The hook_class 'airflow.providers.standard.hooks.package_index.PackageIndexHook' is not fully initialized (UI widgets will be missing), because the 'flask_appbuilder' package is not installed, however it is not required for Airflow components to work
/usr/local/lib/python3.12/site-packages/airflow/api_fastapi/auth/tokens.py:522 DeprecationWarning: The secret_key option in [webserver] has been moved to the secret_key option in [api] - the old setting has been used, but please update your config.
INFO:     Started server process [195]
INFO:     Waiting for application startup.
[2025-07-09T19:23:17.480+0000] {runners.py:118} WARNING - Executing <Task pending name='Task-1' coro=<Server.serve() running at /usr/local/lib/python3.12/site-packages/uvicorn/server.py:70> wait_for=<Future pending cb=[Task.task_wakeup()] created at /usr/local/lib/python3.12/asyncio/locks.py:209> cb=[run_until_complete.<locals>.done_cb()] created at /usr/local/lib/python3.12/asyncio/runners.py:100> took 0.650 seconds
INFO:     Application startup complete.
INFO:     Waiting for child process [195]
INFO:     Child process [195] died
/usr/local/lib/python3.12/site-packages/airflow/configuration.py:858 DeprecationWarning: The secret_key option in [webserver] has been moved to the secret_key option in [api] - the old setting has been used, but please update your config.
INFO:     Waiting for child process [85]
INFO:     Child process [85] died
INFO:     Waiting for child process [162]
INFO:     Child process [162] died
/usr/local/lib/python3.12/site-packages/airflow/configuration.py:858 DeprecationWarning: The secret_key option in [webserver] has been moved to the secret_key option in [api] - the old setting has been used, but please update your config.

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.0Issues Reported for 3.0area: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

    Fields

    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