<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=KOI8-R" http-equiv="Content-Type">
</head>
<body bgcolor="#ffcc99" text="#000099">
Igor Sysoev пишет:
<blockquote cite="mid20050109191527.E54076@is.park.rambler.ru"
 type="cite">
  <pre wrap="">On Sun, 9 Jan 2005, Kpoxa KpoIIIkin wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">Повис у меня nginx, точнее на запросы не отвечает и занимает 100%
процессора.
К сожалению отладочный лог был отключен, хотя сборка с дебагом.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
А отладочная информация, то есть, -g есть ?

  </pre>
</blockquote>
видимо есть, стэк gdb расписал.<br>
<blockquote cite="mid20050109191527.E54076@is.park.rambler.ru"
 type="cite">
  <pre wrap=""></pre>
  <blockquote type="cite">
    <pre wrap="">Процесс не прибиваю.
Игорь, могу strace сделать или еще что-нибудь, что поможет отследить
проблему.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Можно strace.

  </pre>
</blockquote>
strace выдает<br>
writev(232, [], 0)                      = 0<br>
writev(232, [], 0)                      = 0<br>
writev(232, [], 0)                      = 0<br>
writev(232, [], 0)                      = 0<br>
writev(232, [], 0)                      = 0<br>
writev(232, [], 0)                      = 0<br>
writev(232, [], 0)                      = 0<br>
writev(232, [], 0)                      = 0<br>
writev(232, [], 0)                      = 0<br>
writev(232, [], 0)                      = 0<br>
writev(232, [], 0)                      = 0<br>
<br>
и так до бесконечности.<br>
<blockquote cite="mid20050109191527.E54076@is.park.rambler.ru"
 type="cite">
  <pre wrap="">Ещё можно
gdb /path/to/nginx pid
bt

  </pre>
</blockquote>
mx05:/var/log/nginx# gdb /usr/local/sbin/nginx 30248<br>
GNU gdb 2002-04-01-cvs<br>
Copyright 2002 Free Software Foundation, Inc.<br>
GDB is free software, covered by the GNU General Public License, and
you are<br>
welcome to change it and/or distribute copies of it under certain
conditions.<br>
Type "show copying" to see the conditions.<br>
There is absolutely no warranty for GDB.  Type "show warranty" for
details.<br>
This GDB was configured as "i386-linux"...<br>
Attaching to program: /usr/local/sbin/nginx, process 30248<br>
Reading symbols from /usr/lib/libpcre.so.3...done.<br>
Loaded symbols for /usr/lib/libpcre.so.3<br>
Reading symbols from /usr/lib/libz.so.1...done.<br>
Loaded symbols for /usr/lib/libz.so.1<br>
Reading symbols from /lib/libc.so.6...done.<br>
Loaded symbols for /lib/libc.so.6<br>
Reading symbols from /lib/ld-linux.so.2...done.<br>
Loaded symbols for /lib/ld-linux.so.2<br>
Reading symbols from /lib/libnss_compat.so.2...done.<br>
Loaded symbols for /lib/libnss_compat.so.2<br>
Reading symbols from /lib/libnsl.so.1...done.<br>
Loaded symbols for /lib/libnsl.so.1<br>
0x0020a277 in writev () from /lib/libc.so.6<br>
(gdb) bt<br>
#0  0x0020a277 in writev () from /lib/libc.so.6<br>
#1  0x08058fe4 in ngx_linux_sendfile_chain (c=0x2ff888, in=0x819ec0c,
limit=2147479551) at src/os/unix/ngx_linux_sendfile_chain.c:246<br>
#2  0x080623e1 in ngx_http_write_filter (r=0x8713ae4, in=0x0) at
src/http/ngx_http_write_filter.c:173<br>
#3  0x08065232 in ngx_http_chunked_body_filter (r=0x8713ae4, in=0x0) at
src/http/modules/ngx_http_chunked_filter.c:160<br>
#4  0x08066dc5 in ngx_http_gzip_body_filter (r=0x8713ae4, in=0x0) at
src/http/modules/ngx_http_gzip_filter.c:451<br>
#5  0x08067b44 in ngx_http_charset_body_filter (r=0x8713ae4, in=0x0) at
src/http/modules/ngx_http_charset_filter.c:225<br>
#6  0x0804b265 in ngx_output_chain (ctx=0x819dd50, in=0x0) at
src/core/ngx_output_chain.c:192<br>
#7  0x0806268c in ngx_http_copy_filter (r=0x8713ae4, in=0x0) at
src/http/ngx_http_copy_filter.c:95<br>
#8  0x08065d39 in ngx_http_range_body_filter (r=0x8713ae4, in=0x0) at
src/http/modules/ngx_http_range_filter.c:551<br>
#9  0x0805b89e in ngx_http_output_filter (r=0x8713ae4, in=0x0) at
src/http/ngx_http_core_module.c:770<br>
#10 0x0805f480 in ngx_http_writer (wev=0xaedb88) at
src/http/ngx_http_request.c:1443<br>
#11 0x08051b3f in ngx_event_process_posted (cycle=0x808399c) at
src/event/ngx_event_posted.c:36<br>
#12 0x08059c79 in ngx_poll_process_events (cycle=0x808399c) at
src/event/modules/ngx_poll_module.c:577<br>
#13 0x08056fd5 in ngx_worker_process_cycle (cycle=0x808399c, data=0x0)
at src/os/unix/ngx_process_cycle.c:714<br>
#14 0x080556d7 in ngx_spawn_process (cycle=0x808399c, proc=0x8056f40
&lt;ngx_worker_process_cycle&gt;, data=0x0, name=0x80716e7 "worker
process", respawn=-2)<br>
    at src/os/unix/ngx_process.c:138<br>
#15 0x08056861 in ngx_start_worker_processes (cycle=0x808399c, n=1,
type=-2) at src/os/unix/ngx_process_cycle.c:315<br>
#16 0x080562b4 in ngx_master_process_cycle (cycle=0x808399c) at
src/os/unix/ngx_process_cycle.c:114<br>
#17 0x08049e67 in main (argc=1, argv=0xbfffe894) at src/core/nginx.c:245<br>
<br>
<blockquote cite="mid20050109191527.E54076@is.park.rambler.ru"
 type="cite">
  <pre wrap=""></pre>
  <blockquote type="cite">
    <pre wrap="">На этот раз в качестве метода включил poll. nginx проработал 1 час 20 минут.
Нагрузка была около 300 запросов в секунду, траффик ~15 мегабит.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
poll и select имеет смысл использовать только при большом количестве
рабочих процессов, иначе они съедят весб процессор.
  </pre>
</blockquote>
Это полезная информация, спасибо.<br>
<br>
<pre class="moz-signature" cols="72">-- 
тел./факс: +7 (812) 323-23-23 (Санкт-Петербург)
тел./факс: +7 (095) 737-09-77 (Москва)
С уважением, Нарманов Рустам.
</pre>
</body>
</html>