<div dir="ltr">Do you have a recommendation on what handlers are suitable for my use case?<div><br></div><div>Thanks.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 28, 2020 at 6:59 PM Maxim Dounin <<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello!<br>
<br>
On Wed, Oct 28, 2020 at 02:14:40PM +0530, Vikas Kumar wrote:<br>
<br>
> I'm writing an Nginx plugin (using Openresty Lua) which increments a<br>
> counter when a request is received (in ACCESS phase) and decrements the<br>
> counter when request is processed (in LOG phase) in order to keep track of<br>
> in-flight requests.<br>
> <br>
> I've seen some cases where the counter increments but does not decrement<br>
> and reaches a very high value, but can't reproduce. The core of my logic<br>
> depends on the accurate value of the in-flight requests counter.<br>
> <br>
> I wanted to ask if there are any cases where, for a request, ACCESS phase<br>
> is called and LOG phase is not called.<br>
<br>
The access phase handlers might be called more than once, for <br>
example, after internal redirects.<br>
<br>
Note well that access phase handlers might not be called at all if <br>
the request is finalized at earlier stages.<br>
<br>
-- <br>
Maxim Dounin<br>
<a href="http://mdounin.ru/" rel="noreferrer" target="_blank">http://mdounin.ru/</a><br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div>