<div dir="ltr">Hi there!<br><br>I want to know when $msec is used in proxy_set_header directive? I set:<br><br>location / {<br>  proxy_set_header X-Queue-Start $msec;<br>}<br><br>But it's set with the same value as $r->start_sec + $r->start_msec. Is it true, that $msec == ("%d.%d", $r->start_sec, $r->start_msec)? Or it's really generated separately on demand?<br><br>As I see in backtrace (hooked on ngx_http_variable_msec()), it should be generated normally, but it isn't (I'm getting $msec == $r...):<br><br>~$ stap -e 'probe process("/usr/sbin/nginx").function("ngx_http_variable_msec") { print_ubacktrace(); }'<br> 0x446c74 : ngx_http_variable_msec+0x4/0x80 [/usr/sbin/nginx]<br> 0x4464f8 : ngx_http_get_indexed_variable+0x78/0x100 [/usr/sbin/nginx]<br> 0x449381 : ngx_http_script_copy_var_len_code+0x21/0x60 [/usr/sbin/nginx]<br> 0x47a005 : ngx_http_proxy_create_request+0x1b5/0xa60 [/usr/sbin/nginx]<br><br>The problem is, that we are getting very high latency when using proxy_pass for example:<br>X-Queue-Start: 1447494119.609 (Nginx X-Queue-Start header $msec value)<br>X-Queue-Start: 1447494119.678595 (Ruby Time.now.to_f)<br>X-Queue-Start: 1447494121.709 (The same as above)<br>X-Queue-Start: 1447494121.7741442 (The same as above)<br><br>An this information distort real situation calculating request queuing (NewRelic).<br><br>Thank you very much!<br clear="all"><br>-- <br><div class="gmail_signature">Donatas<br></div>
</div>