<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On 01.03.2006, at 11:41, Sergey A. Osokin wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">On Wed, Mar 01, 2006 at 11:31:39AM +0300, L0rda wrote:</DIV> <BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Добрый день,</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">нарисовалась такая проблема, nginx не может открыть более чем 500</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">лог-файлов, по сигналу -HUP не перегружает конфиг, а выдает</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">ошибку 24: Too many open files.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">nginx.conf:<SPAN class="Apple-converted-space">  </SPAN>worker_rlimit_nofile 15000;</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">df -i</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Filesystem<SPAN class="Apple-converted-space">            </SPAN>Inodes <SPAN class="Apple-converted-space">  </SPAN>IUsed <SPAN class="Apple-converted-space">  </SPAN>IFree IUse% Mounted on</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">/dev/sda1<SPAN class="Apple-converted-space">            </SPAN>15794176<SPAN class="Apple-converted-space">  </SPAN>840958 14953218<SPAN class="Apple-converted-space">    </SPAN>6% /</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">/dev/shm<SPAN class="Apple-converted-space">              </SPAN>219846 <SPAN class="Apple-converted-space">      </SPAN>1<SPAN class="Apple-converted-space">  </SPAN>219845<SPAN class="Apple-converted-space">    </SPAN>1% /dev/shm</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">/dev/sda2<SPAN class="Apple-converted-space">            </SPAN>1048576 <SPAN class="Apple-converted-space">  </SPAN>15442 1033134<SPAN class="Apple-converted-space">    </SPAN>2% /var</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">sysctl -a|grep file</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">fs.file-max = 500000</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">fs.file-nr = 11820<SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0<SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>500000</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">ulimit -n 15000</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Чтобы перегрузить конфиг пришлось отключить несколько лог-файлов.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Возможно кто-то встречался с подобной проблемой?</DIV> </BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Смотрим сколько файлов открыто:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">$ sysctl kern.openfiles</DIV></BLOCKQUOTE><DIV><B><BR class="khtml-block-placeholder"></B></DIV><DIV>[root@nl1]# lsof|grep nginx |wc -l</DIV><DIV>3346</DIV><DIV>[root@nl1]# lsof |wc -l</DIV><DIV>17331</DIV><BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Увеличить количество можно с помощью</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "># sysctl kern.maxfiles=...</DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV>об этом я писал выше:</DIV><DIV><BR><BLOCKQUOTE type="cite"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">sysctl -a|grep file</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">fs.file-max = 500000</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">fs.file-nr = 11820<SPAN class="Apple-tab-span" style="white-space:pre; color: rgb(0, 99, 18); ">        </SPAN>0<SPAN class="Apple-tab-span" style="white-space:pre; color: rgb(0, 99, 18); ">        </SPAN>500000</DIV></BLOCKQUOTE></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>У меня НЕТ проблемы с кол-вом открытых файлов в nginx, иначе бы все давно загнулось. Проблема именно с количеством открытых лог-файлов.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Похоже нашел затык, тестирую.</DIV></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://www.Fedora-Hosting.com">http://www.Fedora-Hosting.com</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">+7 (495) 641-03-49</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>