์ ์ด์๋๋ Airflow๊ฐ ๊ฐ์๊ธฐ ๋ฉ์ถ๊ฒ ๊ฐ๋ค๋ ์๊ธฐ๋ฅผ ๋ฃ๊ณ ๋ดค๋๋

์ฅ ~ ?? ๋ด DAG ๋ค ๋ค ์ค๋๊ฐ ?

The scheduler does not appear to be running. Last heartbeat was received 7 hours ago.
The DAGs list may not update, and new tasks will not be scheduled.
>> ํด์
์ค์ผ์ค๋ฌ๊ฐ ์คํ ์ค์ด ์๋ ๊ฒ ๊ฐ์. ๋ง์ง๋ง์ 7์๊ฐ ์ ์ ์์ ๋์์.
DAG ๋ชฉ๋ก์ด ์
๋ฐ์ดํธ๋์ง ์์ ์ ์์ผ๋ฉฐ ์ ์์
์ด ์์ฝ๋์ง ์์.
Airflow ๊ธฐ๋ฅ ์ค์ health ํ์ธํ ์ ์๋ ๋ฐฉ๋ฒ์ด ์์ด์ ํ๋ฒ ์ฌ์ฉํด๋ณด์๋น
<airflow server>/health

health ํ์ง unhealthy ํ์ง ํ์ธํ ์ ์๋ค.
์ง์ง ์ด์ ๋ memory ๋ถ์กฑ !!
scheduler ์ ์์ธ logs๋ฅผ ์ ๋ฆฌํ๋ ค ํ๋ค.

๋์ค์ ๋ ์์ฌ์ ์ค๋๊ณผ ๊ฐ์ ๋ฌธ์ ๊ฐ ์๊ธฐ๋ฉด ์๋๋
์ฃผ๊ธฐ์ ์ผ๋ก log๋ฅผ ์ ๋ฆฌํ๋๋ก ๋ง๋ค์ด์ฃผ๋ ค๊ณ ํ๋ค.
#!/bin/bash
find /home/ubuntu/<path>/airflow/logs/scheduler/ -mtime +14 -exec rm -rf {} \;
์ด๊ณผ ๊ฐ์ shell script๋ฅผ ๋ง๋ค๊ณ
0 0 * * * /home/ubuntu/<path>/remove_log.sh
์ด๊ณผ ๊ฐ์ cron๋ฅผ ์ถ๊ฐํด์ฃผ์๋ค
์ฃผ๊ธฐ์ ์ผ๋ก ์ ์ญ์ ํด์ฃผ๋ ด
๊ทธ๋ฆฌ๊ณ ์ฌ์ฉํ์ง ์๋ image, container๋ฅผ ์ญ์ ํด์ค๋ค.
docker system prune -a
docker volumn๋ ์ ๋ฆฌํด์ค๋ค.
docker volume prune
๋์คํฌ ์ฉ๋ ํ์ธํด์ค๋ค.
docker system df
์ ๋ฆฌํด์ค docker ์ฌ์คํํด์ฃผ์
์๋ ๋ช ๋ น์ด๋ค์ ์์๋๋ก ์คํํด์ค๋ค.
docker compose down
docker compose up airflow-init
docker compose up -d

์ ? ์ ์๋จ์ง ??????????? ํ๊ณ ๋ดค๋๋ฐ
๋ด ์ธ๋ด์ฌ์ ๋ฌธ์ ์๋ค
์ฌ๋ฆฌ๋๋ฐ ์ ๊น์ ์๊ฐ์ด ์์๋์์ ๋ฟ

์ ์ํ ์๋ฃ