Ok, thanks!by donatasm - Nginx Mailing List - English
Given the following nginx config: --- master_process off; daemon off; events { worker_connections 16384; } http { error_log stderr debug; access_log on; log_not_found on; client_body_buffer_size 64k; client_body_in_single_buffer on; upstream nodes { server 127.0.0.1:8000 max_fails=0; server 127.0.0.1:8001 max_fails=0; server 127.0.0.1:8002 max_faby donatasm - Nginx Mailing List - English
Ok, so I managed this to work, needed to add ngx_http_send_header and ngx_http_finalize_request: static void simple_timeout_handler(ngx_event_t* timeout_event) { ngx_int_t result; ngx_http_request_t* request; ngx_log_debug0(NGX_LOG_DEBUG_HTTP, timeout_event->log, 0, "SIMPLE TIMEOUT TIMER END"); request = (ngx_http_request_t*)timeout_event->data; resultby donatasm - Nginx Mailing List - English
So I'm continuing to work on my simple timeout module: http://forum.nginx.org/read.php?2,259019 Now, when timer elapses, I want to cancel ongoing http request, here's my timer handler: static void simple_timeout_handler(ngx_event_t* timeout_event) { ngx_http_request_t* request = (ngx_http_request_t*)timeout_event->data; ngx_log_debug0(NGX_LOG_DEBUG_HTTP, timeout_event->log, 0,by donatasm - Nginx Mailing List - English
I want to write my custom nginx module for measuring request processing time for every HTTP request received. I need to start counting request processing time as early as nginx receives first byte of a request and finish, when it sends the last byte in a response. What would the best place be in nginx request processing pipeline to plug in my module and these measuring hooks?by donatasm - Nginx Mailing List - English
Thanks, it worked as I added ngx_del_timer call in ngx_pool_cleanup_t handler of a requestby donatasm - Nginx Mailing List - English
I'm trying to build a simple timeout module using nginx timers. At the beginning of a request I'm firing up a timer and after time interval elapses I want to check if request has already completed, and if not, finalize it, for example it with NGX_HTTP_REQUEST_TIME_OUT. I have created a filter module. I'm creating a timer in filter headers: static ngx_int_t simple_timeout_filter_headers(ngx_httpby donatasm - Nginx Mailing List - English