Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is causing airflow webserver to fail and restart on docker for Mac?

Tags:

airflow

I am trying to get Airflow running on a local Docker Desktop for Mac installation using the Quick Start instructions for a Docker installation at https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html. The install seems to go correctly, but when I start up the services using docker-compose up, all the services launch except for the webserver. That service starts, but then fails and restarts, over and over. The log shows this error:

EDIT: I found the issue in case someone else runs into it. The default configuration of Docker desktop for Mac doesn't allocate enough memory to run webserver. I bumped up the memory allocation in Docker, restarted everything, and all was good.

like image 975
Eric Fuhrman Avatar asked Apr 20 '21 21:04

Eric Fuhrman


People also ask

How do I restart Airflow Docker?

How do I restart Airflow Services? You can do start/stop/restart actions on an Airflow service and the commands used for each service are given below: Run sudo monit <action> scheduler for Airflow Scheduler. Run sudo monit <action> webserver for Airflow Webserver.

How do I stop Airflow webserver on Mac?

If you run Airflow locally and start it with the two commands airflow scheduler and airflow webserver , then those processes will run in the foreground. So, simply hitting Ctrl-C for each of them should terminate them and all their child processes.

Is Docker necessary for Airflow?

Running Airflow in Docker is much easier compared to running it on Windows without Docker. It is because Docker saves up time needed for installing necessary dependencies which are required for running data pipelines.


1 Answers

increasing the memory configuration of the docker worked for me


Edit: Docs for docker configurations on mac: https://docs.docker.com/docker-for-mac/

like image 59
Kunal Avatar answered Oct 19 '22 19:10

Kunal