patch for fixing timouts #189

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


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:
> 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 

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 


Maxim Dounin

More information about the nginx-devel mailing list