Where to begin ....
I am creating a global pool/hash in which I save cached, hard to
calculate data (pre-compiled regex expressions etc.). I also store pages
I've created using this data in memcached (using the APR interface). I
can't save the calculated regex data in memcached. I initially followed
the advice of creating a private pool, hash and mutex inside a
child_init hook in my server config structure, protecting all access
with the mutex. The module works well enough in regular httpd. However,
when I tried this in worker MPM I got constant:
[notice] child pid xxxxx exit signal Segmentation fault (11)
after a few page loads.
On a whim, I moved the whole creation of these structures into a server
config hook. All these issues seem to have vanished. I have "theorized"
that the pool I am creating at every child creation does not properly work.
I am looking for a discussion of the pros and cons of creating this in a
per child hook, versus the one time server create hook and any other
pointers to help decide (and debug) where/when I should use one or the
other.
Boy, I hope this makes sense.