(28)No space left on device: AH00023: Couldn’t create the rewrite-map mutex in Apache

https://jirak.net
Aug 31, 2018 · 3 min read

증상

아래 로그와 같이 아파치 실행이 되지 않는 문제 발생
이 에러 참으로 오랜만이다…

아마 마지막으로 본것이 10년은 족히 된것 같구나…
너무 오랜만이어서 대략적으로다가 순간 흠칫… ㄷ ㄷ ㄷ

에러 로그

[core:emerg] [pid 6744:tid 139704271460160] (28)No space left on device: AH00023: Couldn’t create the rewrite-map mutex
AH00016: Configuration Failed

당장 처리

아파치 구동 유저가 “nobody”라는 가정 하에…

ipcs -s |grep nobody|awk ‘{print $2}’ |xargs ipcrm -s

이후 아파치를 실행해 보면 정상 구동 될 것이다.

원인

리눅스의 세마포어(semaphore)와 관련이 있다..

제한된 자원 할당량에 의해 더이상 자원을 사용하지 못한다고 생각 하면 될듯…

  • 사용 현황 확인

# ipcs -s

— — — Semaphore Arrays — — — —
key semid owner perms nsems
0x00000000 236847104 root 666 1
0x00000000 236879873 root 666 1
0x00000000 236912642 nobody 600 1
0x00000000 236945411 nobody 600 1
0x00000000 87293956 nobody 600 1
0x00000000 87326725 nobody 600 1
0x00000000 87359494 nobody 600 1

  • 서버상의 제한 값 확인

# ipcs -ls

— — — Semaphore Limits — — — —
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767

커널 파라미터를 수정하여… 저 제한 값을 늘려주는 방법이 있으나…

kernel.sem = 250 64000 32 1024

뭐 이런식으로…
다만,
시스템 환경이 각기 다르고, 이 때문에 절대값이 존재하지 않는 영역 이라…

스크립트를 만들어 놨다가 나중에 처리하면 편하다.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade