nginx report a timestamp on upstream_response_time

Maxim Dounin mdounin at
Thu Feb 12 13:27:44 UTC 2015


On Wed, Feb 11, 2015 at 06:21:48PM +0000, Dani Bento wrote:

> Hello,
> After some research, we simplify our configuration to only have an
> header_filter_by_lua_file 'script.lua' with the following
> code:
> ngx.log(ngx.WARN, string.format("enter script"))
> ngx.exit(502)
> Making a siege -i -c 100 http://localhost/location we get some of the
> reported upstream_response_time.
> To verify if this could be some type of concurrency problem we put a
> ngx.sleep(0.001) before the ngx.exit() call. Apparently, this change
> removed all the wrong times in the upstream_response_time, giving
> always the expected value.
> Can be this a problem of the lua-nginx-module? Or some nginx race
> condition?

Yes, it can.

Maxim Dounin

More information about the nginx-devel mailing list