Pb with module initialization
thierry.magnien at sfr.com
Fri Aug 17 09:58:26 UTC 2012
I am currently writing a module for my own needs and am facing a problem : at startup, I need to load into shared memory some content from a MySQL database.
Shared memory size and mysql parameters (hostname, user, password) are in the main config section.
My problem is I don't know where to insert the code so that it works :
- I initialize shared memory in postconfiguration, but I can't load MySQl data here because the shm is not ready yet,
- I tried to load MySQL data in init module function but then I can't access my module configuration directives (ngx_get_conf returns NULL).
Does anybody have an idea how I could achieve this ?
More information about the nginx-devel