Env:<br>CentOS 5.6<br>nginx 0.8.54<br>rds-json-nginx-module-0.11<br>mysql 5.0<br>drizzle7-2011.08.25<br><br>nginx.conf<br><br> location =/mysql_status {<br> drizzle_status;<br> }<br> <br> #Common SQL Query point<br>
location =/mysql_query {<br> #internal;<br> set_by_lua $sql "return ngx.unescape_uri(ngx.var.arg_sql)";<br> drizzle_query $sql;<br> drizzle_pass mysqls;<br> drizzle_module_header off;<br>
rds_json on;<br> }<br><br>===========================================================================================================<br><br>
request path : localhost/mysql_query?sql=SELECT%201<br><br>print out by gdb:<br><br>Program terminated with signal 11, Segmentation fault.<br>#0 0x080c2551 in ngx_http_upstream_dbd_connect (r=0x8badcd0, u=0x8bae2d4) at ../drizzle-nginx-module/src/ngx_http_drizzle_util.c:604<br>
604 r->connection->log->action = "connecting to upstream";<br>(gdb) bt<br>#0 0x080c2551 in ngx_http_upstream_dbd_connect (r=0x8badcd0, u=0x8bae2d4) at ../drizzle-nginx-module/src/ngx_http_drizzle_util.c:604<br>
#1 0x080c2539 in ngx_http_upstream_dbd_init_request (r=0x8badcd0) at ../drizzle-nginx-module/src/ngx_http_drizzle_util.c:593<br>#2 0x080c2066 in ngx_http_upstream_dbd_init (r=0x8badcd0) at ../drizzle-nginx-module/src/ngx_http_drizzle_util.c:390<br>
#3 0x080be58e in ngx_http_drizzle_handler (r=0x8badcd0) at ../drizzle-nginx-module/src/ngx_http_drizzle_handler.c:164<br>#4 0x0807d610 in ngx_http_core_content_phase (r=0x8badcd0, ph=0x8bbb6d8) at src/http/ngx_http_core_module.c:1350<br>
#5 0x0807c8a9 in ngx_http_core_run_phases (r=0x8badcd0) at src/http/ngx_http_core_module.c:852<br>#6 0x0807c844 in ngx_http_handler (r=0x8badcd0) at src/http/ngx_http_core_module.c:835<br>#7 0x08086a03 in ngx_http_run_posted_requests (c=0xb6a900b8) at src/http/ngx_http_request.c:1828<br>
#8 0x080866b1 in ngx_http_process_request (r=0x8ba6368) at src/http/ngx_http_request.c:1643<br>#9 0x080855b9 in ngx_http_process_request_headers (rev=0xb657b070) at src/http/ngx_http_request.c:1084<br>#10 0x08084f4e in ngx_http_process_request_line (rev=0xb657b070) at src/http/ngx_http_request.c:889<br>
#11 0x0808493b in ngx_http_init_request (rev=0xb657b070) at src/http/ngx_http_request.c:514<br>#12 0x0806f59f in ngx_event_process_posted (cycle=0x8ba6e98, posted=0x80df6cc) at src/event/ngx_event_posted.c:39<br>#13 0x0806ddf3 in ngx_process_events_and_timers (cycle=0x8ba6e98) at src/event/ngx_event.c:272<br>
#14 0x08076c50 in ngx_worker_process_cycle (cycle=0x8ba6e98, data=0x0) at src/os/unix/ngx_process_cycle.c:795<br>#15 0x080746a2 in ngx_spawn_process (cycle=0x8ba6e98, proc=0x8076b3a <ngx_worker_process_cycle>, data=0x0, name=0x80cdc44 "worker process", respawn=-3)<br>
at src/os/unix/ngx_process.c:196<br>#16 0x080761b9 in ngx_start_worker_processes (cycle=0x8ba6e98, n=2, type=-3) at src/os/unix/ngx_process_cycle.c:355<br>#17 0x08075ac2 in ngx_master_process_cycle (cycle=0x8ba6e98) at src/os/unix/ngx_process_cycle.c:136<br>
#18 0x08053faf in main (argc=1, argv=0xbfe971b4) at src/core/nginx.c:401<br><br>============================================================================================================<br><br>request path : /mysql_status<br>
<br>
===========================================================================================================<br>#0 0x080bef9b in ngx_http_drizzle_status_handler (r=0x8ba6368) at ../drizzle-nginx-module/src/ngx_http_drizzle_handler.c:604<br>
604 ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,<br>(gdb) bt<br>#0 0x080bef9b in ngx_http_drizzle_status_handler (r=0x8ba6368) at ../drizzle-nginx-module/src/ngx_http_drizzle_handler.c:604<br>#1 0x0807d610 in ngx_http_core_content_phase (r=0x8ba6368, ph=0x8bbb6d8) at src/http/ngx_http_core_module.c:1350<br>
#2 0x0807c8a9 in ngx_http_core_run_phases (r=0x8ba6368) at src/http/ngx_http_core_module.c:852<br>#3 0x0807c844 in ngx_http_handler (r=0x8ba6368) at src/http/ngx_http_core_module.c:835<br>#4 0x080866a6 in ngx_http_process_request (r=0x8ba6368) at src/http/ngx_http_request.c:1641<br>
#5 0x080855b9 in ngx_http_process_request_headers (rev=0xb657b070) at src/http/ngx_http_request.c:1084<br>#6 0x08084f4e in ngx_http_process_request_line (rev=0xb657b070) at src/http/ngx_http_request.c:889<br>#7 0x0808493b in ngx_http_init_request (rev=0xb657b070) at src/http/ngx_http_request.c:514<br>
#8 0x0806f59f in ngx_event_process_posted (cycle=0x8ba6e98, posted=0x80df6cc) at src/event/ngx_event_posted.c:39<br>#9 0x0806ddf3 in ngx_process_events_and_timers (cycle=0x8ba6e98) at src/event/ngx_event.c:272<br>#10 0x08076c50 in ngx_worker_process_cycle (cycle=0x8ba6e98, data=0x0) at src/os/unix/ngx_process_cycle.c:795<br>
#11 0x080746a2 in ngx_spawn_process (cycle=0x8ba6e98, proc=0x8076b3a <ngx_worker_process_cycle>, data=0x0, name=0x80cdc44 "worker process", respawn=-3)<br> at src/os/unix/ngx_process.c:196<br>#12 0x080761b9 in ngx_start_worker_processes (cycle=0x8ba6e98, n=2, type=-3) at src/os/unix/ngx_process_cycle.c:355<br>
#13 0x08075ac2 in ngx_master_process_cycle (cycle=0x8ba6e98) at src/os/unix/ngx_process_cycle.c:136<br>#14 0x08053faf in main (argc=1, argv=0xbfe971b4) at src/core/nginx.c:401<br><br>
===========================================================================================================<br clear="all">Thank any help !!!<br><br>-- <br>Wendal Chen<br><br><br>