December 5th, 2012, 12:47 AM
How to install new builds of apache module without segfaulting?
I would like to know how I can install new builds of my custom apache module without segfaulting as new requests come in, before apache can be restarted.
I have authored a custom apache module. I am running Linux. I notice that whenever I install it over the old .so while apache is running and then request a page, I get a segfault in each running apache process. I assume this is because the previous .so is memory mapped by the system loader.
This is not a problem for me during development phase. However, now we are moving into a production phase in an environment with 10 requests/sec. Segfaulting all the httpd at once seems like a pretty bad idea.
Has anyone dealt with this? Is there a recommended procedure?
December 5th, 2012, 01:24 AM
Copy it over as a brand new file, update the configuration to point to the new file, and do a "graceful" restart.
And it wouldn't be a bad idea to keep the old one around in case there are problems with the new one.
December 5th, 2012, 01:35 AM
That makes an awful lot of sense. thanks.
We're bullding custom RPMs anyway, so the RPM install script can automate that.
Originally Posted by requinix