2012-09-15

Mail]FreeBSD 5.4R에서 qmail big-concurrency 패치시 해결방안



 
qmail 에 big-concurrency 패치를 한 후 컴파일을 하면 아래와 같은 오류가
나올경우 아래의 2가지 방법이 제시 되었다...(아직 테스트 못해봤습니다.ㅜㅜ)

   에러내용 :
   Oops. Your system's FD_SET() has a hidden limit of 1024 descriptors.
   This means that the qmail daemons could crash if you set the run-time
   concurrency higher than 509. So I'm going to insist that the concurrency
   limit in conf-spawn be at most 509. Right now it's 1000.


방법 1 :  커널소스를 보면
 sys/sys/select.h
 파 일에
 /*
 * Select uses bit masks of file descriptors in longs. These macros
 * manipulate such bit fields (the filesystem macros use chars).
 * FD_SETSIZE may be defined be the user, but the default here should
 * be enough for most uses.
 */
 #ifndef FD_SETSIZE
 #define FD_SETSIZE 1024U
 #endif
 라는 내용이 있습니다.
 기본값이 1024인데, qmail의 big-concurrency 패치는 동시에 그 이상의 파일을 생성하는 것을 허용하는 것으로 보입니다.
 커널에서 제한이 걸려 qmail이 crash가 일어날 수 있으니 동시에 열 수 있는 파일을 509 이하가 되도록 해야한다는 것입니다.
 대규모의 메일을 주고받는 서버라면 select.h 파일을 수정하고 커널컴파일을 다시 하시거나, qmail의 big-concurrency 설정을 변경하세요.

방법 2 :
         select.h를 수정할 필요 없이 FD_SETSIZE 만 어플리케이션에서
         재정의하고(#define) 빌드하면 FD_SET의 최대 크기가 변경됩니다.

댓글 없음:

댓글 쓰기