#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    2
    Rep Power
    0

    How to install new builds of apache module without segfaulting?


    Hi everyone.

    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.

    Background:

    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?
  2. #2
  3. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,298
    Rep Power
    9400
    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.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    2
    Rep Power
    0
    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
    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.

IMN logo majestic logo threadwatch logo seochat tools logo