nginx повис
Kpoxa KpoIIIkin
kpoxa at kpoxa.net
Sun Jan 9 19:32:37 MSK 2005
Igor Sysoev пишет:
>On Sun, 9 Jan 2005, Kpoxa KpoIIIkin wrote:
>
>
>
>>Повис у меня nginx, точнее на запросы не отвечает и занимает 100%
>>процессора.
>>К сожалению отладочный лог был отключен, хотя сборка с дебагом.
>>
>>
>
>А отладочная информация, то есть, -g есть ?
>
>
>
видимо есть, стэк gdb расписал.
>>Процесс не прибиваю.
>>Игорь, могу strace сделать или еще что-нибудь, что поможет отследить
>>проблему.
>>
>>
>
>Можно strace.
>
>
>
strace выдает
writev(232, [], 0) = 0
writev(232, [], 0) = 0
writev(232, [], 0) = 0
writev(232, [], 0) = 0
writev(232, [], 0) = 0
writev(232, [], 0) = 0
writev(232, [], 0) = 0
writev(232, [], 0) = 0
writev(232, [], 0) = 0
writev(232, [], 0) = 0
writev(232, [], 0) = 0
и так до бесконечности.
>Ещё можно
>gdb /path/to/nginx pid
>bt
>
>
>
mx05:/var/log/nginx# gdb /usr/local/sbin/nginx 30248
GNU gdb 2002-04-01-cvs
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-linux"...
Attaching to program: /usr/local/sbin/nginx, process 30248
Reading symbols from /usr/lib/libpcre.so.3...done.
Loaded symbols for /usr/lib/libpcre.so.3
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_compat.so.2...done.
Loaded symbols for /lib/libnss_compat.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
0x0020a277 in writev () from /lib/libc.so.6
(gdb) bt
#0 0x0020a277 in writev () from /lib/libc.so.6
#1 0x08058fe4 in ngx_linux_sendfile_chain (c=0x2ff888, in=0x819ec0c,
limit=2147479551) at src/os/unix/ngx_linux_sendfile_chain.c:246
#2 0x080623e1 in ngx_http_write_filter (r=0x8713ae4, in=0x0) at
src/http/ngx_http_write_filter.c:173
#3 0x08065232 in ngx_http_chunked_body_filter (r=0x8713ae4, in=0x0) at
src/http/modules/ngx_http_chunked_filter.c:160
#4 0x08066dc5 in ngx_http_gzip_body_filter (r=0x8713ae4, in=0x0) at
src/http/modules/ngx_http_gzip_filter.c:451
#5 0x08067b44 in ngx_http_charset_body_filter (r=0x8713ae4, in=0x0) at
src/http/modules/ngx_http_charset_filter.c:225
#6 0x0804b265 in ngx_output_chain (ctx=0x819dd50, in=0x0) at
src/core/ngx_output_chain.c:192
#7 0x0806268c in ngx_http_copy_filter (r=0x8713ae4, in=0x0) at
src/http/ngx_http_copy_filter.c:95
#8 0x08065d39 in ngx_http_range_body_filter (r=0x8713ae4, in=0x0) at
src/http/modules/ngx_http_range_filter.c:551
#9 0x0805b89e in ngx_http_output_filter (r=0x8713ae4, in=0x0) at
src/http/ngx_http_core_module.c:770
#10 0x0805f480 in ngx_http_writer (wev=0xaedb88) at
src/http/ngx_http_request.c:1443
#11 0x08051b3f in ngx_event_process_posted (cycle=0x808399c) at
src/event/ngx_event_posted.c:36
#12 0x08059c79 in ngx_poll_process_events (cycle=0x808399c) at
src/event/modules/ngx_poll_module.c:577
#13 0x08056fd5 in ngx_worker_process_cycle (cycle=0x808399c, data=0x0)
at src/os/unix/ngx_process_cycle.c:714
#14 0x080556d7 in ngx_spawn_process (cycle=0x808399c, proc=0x8056f40
<ngx_worker_process_cycle>, data=0x0, name=0x80716e7 "worker process",
respawn=-2)
at src/os/unix/ngx_process.c:138
#15 0x08056861 in ngx_start_worker_processes (cycle=0x808399c, n=1,
type=-2) at src/os/unix/ngx_process_cycle.c:315
#16 0x080562b4 in ngx_master_process_cycle (cycle=0x808399c) at
src/os/unix/ngx_process_cycle.c:114
#17 0x08049e67 in main (argc=1, argv=0xbfffe894) at src/core/nginx.c:245
>>На этот раз в качестве метода включил poll. nginx проработал 1 час 20 минут.
>>Нагрузка была около 300 запросов в секунду, траффик ~15 мегабит.
>>
>>
>
>poll и select имеет смысл использовать только при большом количестве
>рабочих процессов, иначе они съедят весб процессор.
>
>
Это полезная информация, спасибо.
--
тел./факс: +7 (812) 323-23-23 (Санкт-Петербург)
тел./факс: +7 (095) 737-09-77 (Москва)
С уважением, Нарманов Рустам.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20050109/f8a3d80a/attachment.html>
More information about the nginx-ru
mailing list