Welcome! Log In Create A New Profile

Advanced

Re: Nginx logging phase

Vikas Kumar
October 29, 2020 08:56AM
Do you have a recommendation on what handlers are suitable for my use case?

Thanks.

On Wed, Oct 28, 2020 at 6:59 PM Maxim Dounin <mdounin@mdounin.ru> wrote:

> Hello!
>
> On Wed, Oct 28, 2020 at 02:14:40PM +0530, Vikas Kumar wrote:
>
> > I'm writing an Nginx plugin (using Openresty Lua) which increments a
> > counter when a request is received (in ACCESS phase) and decrements the
> > counter when request is processed (in LOG phase) in order to keep track
> of
> > in-flight requests.
> >
> > I've seen some cases where the counter increments but does not decrement
> > and reaches a very high value, but can't reproduce. The core of my logic
> > depends on the accurate value of the in-flight requests counter.
> >
> > I wanted to ask if there are any cases where, for a request, ACCESS phase
> > is called and LOG phase is not called.
>
> The access phase handlers might be called more than once, for
> example, after internal redirects.
>
> Note well that access phase handlers might not be called at all if
> the request is finalized at earlier stages.
>
> --
> Maxim Dounin
> http://mdounin.ru/
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx logging phase

Vikas Kumar October 28, 2020 04:46AM

Re: Nginx logging phase

Maxim Dounin October 28, 2020 09:30AM

Re: Nginx logging phase

Vikas Kumar October 29, 2020 08:56AM

Re: Nginx logging phase

Maxim Dounin October 29, 2020 11:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 168
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready