ADF managed Airflow login returns 503 error

Peter Yacoub 0 Reputation points
2024-06-18T13:12:03.5666667+00:00

I have a managed Airflow instance inside Azure Data Factory.

With no recent changes to the code related to airflow configuration. We suddenly are unable to login to airflow and whenever I click on the "monitor" button. I get a

503 Service Temporarily Unavailable


nginx

For https://6c313388501717.uksouth.airflow.svc.datafactory.azure.com/login/

There are no additional error messages on airflow or ADF to help me diagnose and fix this

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,080 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 19,221 Reputation points
    2024-06-18T14:08:55.6833333+00:00

    Based on this old thread :

    1. Bump up the # of AU’s allocated to your Webserver. If they’re at the default 2AU, try bumping them up to ~4-5 AU. That’ll trigger a restart, so refresh your Airflow UI to check for changes. If your deployment has a lot of DAGs to parse through, this is especially important. To do this, go to: app.astronomer.cloud 33 > deployment > Configure 2. Make sure you’re not running a ton of toplevel code. If you’re making API calls, JSON requests or database requests outside of an operator at a high frequency, your Webserver is much more likely to timeout. When Airflow interprets a file to look for any valid DAGs, it first runs all code at the top level (i.e. outside of operators) immediately. Even if the operator itself only gets executed at execution time, everything called _outside of an operator is called every heartbeat, which can be quite taxing. We’d recommend taking the logic you have currently running outside of an operator and moving it inside of a python_operator.


    The 503 Service Unavailable error in your managed Airflow instance within Azure Data Factory typically indicates a temporary server issue. First, check the Azure Service Health dashboard for any ongoing issues or maintenance activities in your region. Review the Airflow logs for any recent entries that might provide a clue, especially those related to the web server, scheduler, and worker nodes. Verify that there have been no inadvertent changes to network configurations, such as firewall rules or network security group settings. Try restarting the Airflow environment via the Azure Data Factory portal to resolve any temporary issues. Ensure the Nginx configuration is correct and that it can connect to the Airflow web server. Check for any scaling issues, as heavy load or resource exhaustion might cause this error, and consider scaling up the instance if needed. If these steps do not resolve the issue, contact Azure Support for further diagnostics and assistance.

    https://forum.astronomer.io/t/the-airflow-ui-isnt-updating-after-i-deploy-503-service-temporarily-unavailable/205

    https://stackoverflow.com/questions/18790684/why-does-azure-give-me-an-intermittent-error-503-the-service-is-unavailable

    0 comments No comments