nginx -V
built by gcc 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC)
configure arguments: --prefix=/home/strato/app/nginx_server/nginx --with-debug --with-cc-opt=-O0 --add-module=../ngx_devel_kit-0.2.17 --add-module=../echo-nginx-module-0.38rc2 --add-module=../ngx_coolkit-0.2rc1 --add-module=../set-misc-nginx-module-0.22rc8 --add-module=../form-input-nginx-module-0.07rc5 --add-module=../encrypted-session-nginx-module-0.02 --add-module=../drizzle-nginx-module-0.1.2rc7 --add-module=../ngx_lua-0.5.0rc30 --add-module=../headers-more-nginx-module-0.17rc1 --add-module=../srcache-nginx-module-0.13rc8 --add-module=../array-var-nginx-module-0.03rc1 --add-module=../memc-nginx-module-0.13rc3 --add-module=../redis2-nginx-module-0.08rc4 --add-module=../redis-nginx-module-0.3.6 --add-module=../upstream-keepalive-nginx-module-0.7 --add-module=../auth-request-nginx-module-0.2 --add-module=../rds-json-nginx-module-0.12rc10 --add-module=../rds-csv-nginx-module-0.05rc2 --with-ld-opt=-Wl,-rpath,/home/strato/app/nginx_server/lib:/home/strato/app/nginx_server/luajit/lib --with-cc=gcc44 --user=strato --group=strato --with-http_dav_module --with-http_stub_status_module
执行命令 killall -HUP nginx 后, 通过gdb获取到下述的信息
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Program received signal SIGHUP, Hangup.
0x00929410 in __kernel_vsyscall ()
(gdb) bt
#0 0x00929410 in __kernel_vsyscall ()
#1 0x001e2458 in __epoll_wait_nocancel () from /lib/libc.so.6
#2 0x0807fd24 in ngx_epoll_process_events (cycle=0x9b12208, timer=970, flags=3) at src/event/modules/ngx_epoll_module.c:573
#3 0x080734bf in ngx_process_events_and_timers (cycle=0x9b12208) at src/event/ngx_event.c:246
#4 0x0807e3d0 in ngx_worker_process_cycle (cycle=0x9b12208, data="" at src/os/unix/ngx_process_cycle.c:802
#5 0x0807b644 in ngx_spawn_process (cycle=0x9b12208, proc=0x807e261 <ngx_worker_process_cycle>, data="" name=0x8134b03 "worker process",
respawn=-4) at src/os/unix/ngx_process.c:197
#6 0x0807d571 in ngx_start_worker_processes (cycle=0x9b12208, n=2, type=-4) at src/os/unix/ngx_process_cycle.c:361
#7 0x0807d17c in ngx_master_process_cycle (cycle=0x9b12208) at src/os/unix/ngx_process_cycle.c:250
#8 0x08057978 in main (argc=1, argv=0xbfec9354) at src/core/nginx.c:412
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x080e951d in ngx_http_upstream_drizzle_free_connection (log=0x9b12214, c=0xffffffff, dc=0x0, dscf=0xb75870c8)
at ../drizzle-nginx-module-0.1.2rc7/src/ngx_http_drizzle_upstream.c:949
949 ../drizzle-nginx-module-0.1.2rc7/src/ngx_http_drizzle_upstream.c: No such file or directory.
in ../drizzle-nginx-module-0.1.2rc7/src/ngx_http_drizzle_upstream.c
(gdb) c
Continuing.
Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
//---------------------------------------------------------------------------------------------------------------------------
配置信息摘取
upstream mysqls {
password=123456 user=root protocol=mysql;
drizzle_keepalive max=100 mode=single overflow=reject;
}
location =/mysql_query {
internal;
drizzle_query $echo_request_body;
drizzle_pass mysqls;
drizzle_module_header off;
error_log /home/strato/tmp/danoo/strato/log/nginx_mysql.log;
}
--
Wendal Chen
GuangDong China