Welcome! Log In Create A New Profile



November 10, 2021 10:24PM
In my module, I am allocating some memory for each request and saving the
ptr in my module context. I am registering a callback using
ngx_http_cleanup_add to perform cleanup for each request. I am releasing
the memory for the allocation in the cleanup callback. In the log phase, I
want to make available the contents of the memory I allocated as an nginx

However, when I try to print this variable in the log, the memory has
already been de-allocated. It looks like the clean-up handlers are called
before the log phase. Since I have released the memory in the cleanup
handler, I have nothing to log in the log phase. Is there a way to defer
the calling of the clean-up handler until after the log phase?

nginx-devel mailing list
Subject Author Views Posted


dnj0496 574 November 10, 2021 10:24PM

Re: ngx_http_cleanup_add

Maxim Dounin 249 November 10, 2021 10:48PM

Re: ngx_http_cleanup_add

dnj0496 330 November 10, 2021 11:04PM

Sorry, you do not have permission to post/reply in this forum.

Online Users

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