Welcome! Log In Create A New Profile

Advanced

Re: Does ngx_pool_t survives reload ?

May 07, 2014 08:54AM
As far as I know, ngx_pool_t are created on process memory area,
so, after a reload the new process has a new memory area and do not have
access to the old.
You can recompile the regex on your module startup, at init worker hook.



On Wed, May 7, 2014 at 6:16 AM, MAGNIEN, Thierry <thierry.magnien@sfr.com>wrote:

> Hi,
>
> I wrote a Nginx module and am facing a problem: I need to keep some data
> across reloads, so I'm using a shared memory segment and everything works
> fine except one thing.
>
> In the data structure I keep, there are ngx_regex_compile_t data, which
> were allocated on a ngx_pool_t. And what I see is that all the data are
> kept, except regex code, which was allocated on this ngx_pool_t.
>
> Are pools resetted on a reload and is there a way:
> - either to allocate regex codes on something else than a pool
> - or use a pool that would not be resetted ?
>
> Thanks for your help,
> Thierry
>
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Does ngx_pool_t survives reload ?

MAGNIEN, Thierry 932 May 07, 2014 05:18AM

Re: Does ngx_pool_t survives reload ?

wandenberg 568 May 07, 2014 08:54AM



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

Online Users

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