memcached upstream: exited on signal 11
Andrey Ignatov
andr.pl at gmail.com
Thu Dec 20 20:02:18 MSK 2007
re all
Использую memcached бекенд в nginx. В результате воркер, на который
приходит запрос падает в корку от первого же запроса.
#nginx -V
nginx version: nginx/0.6.22
configure arguments: --prefix=/usr/local/etc/nginx --with-cc-opt=-I
/usr/local/include --with-ld-opt=-L /usr/local/lib
--conf-path=/usr/local/etc/nginx/nginx.conf
--sbin-path=/usr/local/sbin/nginx --pid-path=/var/run/nginx.pid
--error-log-path=/var/log/nginx-error.log --user=www --group=www
--without-http_charset_module --without-http_ssi_module
--without-http_userid_module --without-http_auth_basic_module
--without-http_autoindex_module --without-http_map_module
--without-http_referer_module --without-http_fastcgi_module
--without-http_limit_zone_module --without-http_browser_module
--without-http_upstream_ip_hash_module --with-debug
--http-client-body-temp-path=/var/tmp/nginx/client_body_temp
--http-proxy-temp-path=/var/tmp/nginx/proxy_temp
--http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp
--http-log-path=/var/log/nginx-access.log --with-http_dav_module
--with-http_flv_module
nginx.conf:
------------------------------------------------------------------------
...
memcached_connect_timeout 5;
memcached_read_timeout 15;
memcached_send_timeout 15;
server {
listen 192.168.0.205;
server_name feed.domain.com;
location / {
if ($request_uri ~ "\/(\d+)\/blogs\.(rss|rss2|atom)\.xml$") {
set $user_id "$1";
set $type "$2";
set $memcached_key "blogfeed::$user_id::$type";
error_page 404 502 504 = /generate/private/generate_blogfeed.php?user_id=$user_id&type=$type;
}
memcached_pass 192.168.0.205:11211;
}
location /generate {
internal;
proxy_pass http://192.168.0.205:8001/;
proxy_set_header Host domain.com;
}
}
------------------------------------------------------------------------
Делаю запрос http://feed.domain.com/788/788/blogs.rss2.xml и воркер
сразу падает.
Вот так выглядит error-лог в момент падения:
------------------------------------------------------------------------
2007/12/20 19:38:42 [debug] 92061#0: *1 post rewrite phase: 3
2007/12/20 19:38:42 [debug] 92061#0: *1 access phase: 4
2007/12/20 19:38:42 [debug] 92061#0: *1 post access phase: 5
2007/12/20 19:38:42 [debug] 92061#0: *1 http set discard body
2007/12/20 19:38:42 [debug] 92061#0: *1 http init upstream, client timer: 0
2007/12/20 19:38:42 [debug] 92061#0: *1 kevent set event: 26: ft:-2 fl:0025
2007/12/20 19:38:42 [debug] 92061#0: *1 http memcached request: "192.168.18.14"
2007/12/20 19:38:42 [debug] 92061#0: *1 http cleanup add: 0813A7F4
2007/12/20 19:38:42 [notice] 92060#0: signal 20 (SIGCHLD) received
2007/12/20 19:38:42 [alert] 92060#0: worker process 92061 exited on signal 11 (core dumped)
2007/12/20 19:38:42 [notice] 92060#0: start worker process 92068
2007/12/20 19:38:42 [notice] 92060#0: signal 23 (SIGIO) received
------------------------------------------------------------------------
В gdb следующее:
------------------------------------------------------------------------
#gdb nginx /var/crash/nginx.core.2016
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 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-marcel-freebsd"...
Core was generated by `nginx'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/local/lib/libpcre.so.0...done.
Loaded symbols for /usr/local/lib/libpcre.so.0
Reading symbols from /lib/libz.so.2...done.
Loaded symbols for /lib/libz.so.2
Reading symbols from /lib/libc.so.5...done.
Loaded symbols for /lib/libc.so.5
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0 0x08085c55 in ngx_http_upstream_init (r=0x80b8000) at src/http/ngx_http_upstream.c:435
435 src/http/ngx_http_upstream.c: No such file or directory. in src/http/ngx_http_upstream.c
(gdb) bt
#0 0x08085c55 in ngx_http_upstream_init (r=0x80b8000) at src/http/ngx_http_upstream.c:435
#1 0x0809ae63 in ngx_http_memcached_handler (r=0x80b8000) at src/http/modules/ngx_http_memcached_module.c:221
#2 0x08070cdc in ngx_http_core_content_phase (r=0x80b8000, ph=0x81519d0)
at src/http/ngx_http_core_module.c:896
#3 0x08070445 in ngx_http_core_run_phases (r=0x80b8000) at src/http/ngx_http_core_module.c:622
#4 0x080703bd in ngx_http_handler (r=0x80b8000) at src/http/ngx_http_core_module.c:605
#5 0x0807920d in ngx_http_process_request (r=0x80b8000) at src/http/ngx_http_request.c:1460
#6 0x080782d9 in ngx_http_process_request_headers (rev=0x8206474) at src/http/ngx_http_request.c:942
#7 0x08077c36 in ngx_http_process_request_line (rev=0x8206474) at src/http/ngx_http_request.c:750
#8 0x0807768f in ngx_http_init_request (rev=0x8206474) at src/http/ngx_http_request.c:460
#9 0x0806328e in ngx_event_process_posted (cycle=0x80b9020, posted=0x80ae5c0)
at src/event/ngx_event_posted.c:39
#10 0x0806179d in ngx_process_events_and_timers (cycle=0x80b9020) at src/event/ngx_event.c:272
#11 0x0806ac8b in ngx_worker_process_cycle (cycle=0x80b9020, data=0x0) at src/os/unix/ngx_process_cycle.c:767
#12 0x08068c64 in ngx_spawn_process (cycle=0x80b9020, proc=0x806ab34 <ngx_worker_process_cycle>, data=0x0,
name=0x80a033c "worker process", respawn=-2) at src/os/unix/ngx_process.c:187
#13 0x0806a18f in ngx_start_worker_processes (cycle=0x80b9020, n=2, type=-2)
at src/os/unix/ngx_process_cycle.c:332
#14 0x08069a47 in ngx_master_process_cycle (cycle=0x80b9020) at src/os/unix/ngx_process_cycle.c:124
#15 0x0804a08f in main (argc=1, argv=0xbfbfeca8) at src/core/nginx.c:355
(gdb)
------------------------------------------------------------------------
#uname -srm
FreeBSD 5.4-RELEASE-p12 i386
Пробовал то же самое на nginx 0.5.31, результат аналогичный - корка
после первого же запроса.
--
Andrey Ignatov
Skript, System administrator
More information about the nginx-ru
mailing list