airflow

DAG ~ seems to be missing from DagBag

DanielZZI 2024. 3. 13. 22:53
728x90

1.현상

DAG ~ seems to be  missing from DagBag

특정 dag가 안보이는 문제가 생김

->scheduler 로그 확인해봄

 

pq: could not resize shared memory segment "/PostgreSQL.2058389254" to 12615680 bytes: No space left on device

 

2.원인

airflow의 external database인 postgresql 3개 pod 의 shm size 확인

-> 1번 data pod의 shm이 full

 

shm  64M 64M 176K 100% /dev/shm

 

 

3.조치

- postgresql statefulset의 memory limit 늘림

 

- memory사이즈에 이어서 shared memory 사이즈 늘림

  volumes:
    - name: dshm
      emptyDir:
        medium: Memory
        sizeLimit: 512Mi
  volumeMounts:
    - name: dshm
      mountPath: /dev/shm

 

 

알고보니 bitnami postgresql-ha helm차트에서 이미 관련 내용이 있었다.

https://github.com/bitnami/charts/tree/main/bitnami/postgresql-ha#use-a-volume-for-devshm