[module dev] PCRE compiled code lost at reload

Maxim Dounin mdounin at mdounin.ru
Wed Jun 22 14:27:08 UTC 2016


On Wed, Jun 22, 2016 at 02:21:51PM +0000, MAGNIEN, Thierry wrote:

> Thanks for your response. I already saw that, and that's why I 
> use a dedicated pool in shared memory for regex compilation. All 
> my ngx_regex_compile_t structs allocate from this unique pool. 
> Could pool in shared memory be automatically freed when 
> reloading ? And in that case, why would new workers get the 
> correct value ? Is there a place where memory is duplicated 
> between workers before dying/start of workers ?

There are no pools in shared memory in nginx - except 
ngx_slab_pool_t, which is quite different from normal memory 
pools and cannot be used in ngx_regex_compile_t.

Maxim Dounin

More information about the nginx-devel mailing list