patch for fixing timouts #189

Maxim Dounin mdounin at mdounin.ru
Wed Feb 21 17:45:54 UTC 2018


Hello!

On Tue, Feb 20, 2018 at 08:51:08PM +0100, Felix Ruess wrote:

> quite a while ago someone else already found the problem that the timeouts
> use system time rather than a monotonic clock:
> https://trac.nginx.org/nginx/ticket/189
> 
> I updated/fixed the patch [1] there a while ago already and have this
> successfully deployed on ~50 devices since then.
> 
> Any chance to get this included now? Or is there still something missing?

The patch in question was never submitted to the mailing list[1], 
and hence was never properly reviewed and/or considered for 
inclusion.

Overall, I think the patch is somewhat overcomplicated.  Also, the 
"monotonic_timers" configuration directive introduced by the patch 
seems to behave wrong if changed during a reconfiguration: 
ngx_current_msec values can be saved into various shared memory 
zones (e.g., limit_req will do it), leading to incorrect results 
if the directive is changed.

Rather, we may want to use monotonic timers unconditionally, at 
least if a fast variant is available.  I'll take a look as time 
permits.

[1] http://nginx.org/en/docs/contributing_changes.html

-- 
Maxim Dounin
http://mdounin.ru/


More information about the nginx-devel mailing list