GitHub user GayathriSrividya added a comment to the discussion: Airflow cli response times
Hi everyone, I looked into this and wanted to share a structured summary since this can be confusing at first glance. What is happening - The traceback with ValueError: not enough values to unpack is very likely happening during startup configuration parsing, not during an actual database connection attempt. - Airflow initializes settings early, and while deriving the async SQLAlchemy URI from the configured sync URI, a malformed value can fail fast. - That means a slow airflow --help and an invalid sql_alchemy_conn can overlap, making the root cause look like “database is slow” when the immediate failure is actually config parsing. What to check first - Confirm the effective value of AIRFLOW__DATABASE__SQL_ALCHEMY_CONN in the environment where the command is executed. - Confirm database.sql_alchemy_conn in airflow.cfg for that same runtime context. - Look for common bad values: 1. empty string 2. placeholder text 3. secret reference string instead of a URI 4. value missing a colon separator Quick sanity test - Set a known-good local value temporarily (for comparison only), then rerun airflow --help. - If the unpacking traceback disappears, that strongly indicates malformed URI config was the direct issue. Why this still feels slow even when config is valid - airflow --help is not a “tiny CLI only” path; startup includes non-trivial imports and initialization work. - On constrained environments (slow disk/network/CPU, heavy image, many installed packages), this startup overhead is much more noticeable. Follow-up fix I opened a PR to make this failure mode explicit and actionable instead of cryptic: https://github.com/apache/airflow/pull/68783 What that PR does: 1. validates malformed or empty sync SQLAlchemy URI input in startup path 2. raises a clearer error message that points directly to: - AIRFLOW__DATABASE__SQL_ALCHEMY_CONN - sql_alchemy_conn in airflow.cfg 3. adds focused tests for: - valid URI conversions - malformed input behavior and messaging If helpful, I can also share a small startup timing matrix (before/after config fix, and across two environments) to separate expected startup overhead from misconfiguration effects. GitHub link: https://github.com/apache/airflow/discussions/68707#discussioncomment-17374004 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
