WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  refresh the httpd.conf file configuration changes with out restart of IBM Http server

    Posted Tue July 11, 2017 08:57 AM

    Hi All,

     

    is it possible to  refresh the configuration  changes  made to  httpd.conf file with out restarting of IBM Http server on linux/windows machines?

     

    if yes, please let me know...

     

    Venkat



  • 2.  RE: refresh the httpd.conf file configuration changes with out restart of IBM Http server

    Posted Wed July 12, 2017 12:45 AM

    I'm afraid you cannot avoid the restart process.

    All the commands to stop and restart are:

    • Stop Now: apachectl -k stop
    • Graceful Restart: apachectl -k graceful
    • Restart Now: apachectl -k restart
    • Graceful Stop: apachectl -k graceful-stop

    All these commands can be confirmed by executing apachectl -h.

    You can also refer the community document of the command explanation:

    Apache 2.2.x - Stopping and Restarting

    Apache 2.4.x - Stopping and Restarting Apache HTTP Server



  • 3.  RE: refresh the httpd.conf file configuration changes with out restart of IBM Http server

    Posted Thu July 13, 2017 02:54 AM

    Hi,

     

    ooops. Should have read the posting a little closer. Sorry. 

     

    Fearo



  • 4.  RE: refresh the httpd.conf file configuration changes with out restart of IBM Http server

    Posted Wed July 12, 2017 05:06 AM

    Venkat,

     

    Yes, there is a mechanism. In fact it's there by default. The key setting you are looking for is in the plugin-cfg.xml and it's the RefreshInterval. It enables the HTTPServer to implement updated plugin-cfg.xml without a restart.

    The RefreshInterval specifies the time interval, in seconds, at which the plug-in checks the configuration file to see if updates or changes have occurred. The plug-in checks the file for any modifications that have occurred since the last time the plug-in configuration was loaded. There is even a mechanism for using the old one if the new one is invalid for some reason. 

    The plug-in configuration works within the process scope. That is to say, for a multi-threaded Web server like IBM HTTP Server 2.0.x, if one thread within a process detects that the plugin-cfg.xml has been modified and reloads it, the new configuration will be used by all the other threads for all the new requests.

    However, for all the requests that are being processed by the plug-in, the old configuration is still used until the requests have been served. In other words, a plugin-cfg.xml reload will not affect the existing active requests.

    Note that the 'generation of the new plugin' is a different matter entirely.

    https://www.ibm.com/support/knowledgecenter/SSAW57_9.0.0/com.ibm.websphere.nd.multiplatform.doc/ae/rwsv_plugincfg.html#rwsv_plugincfg__RefreshInterval

    Hope this help.

    Fearo

     



  • 5.  RE: refresh the httpd.conf file configuration changes with out restart of IBM Http server

    Posted Wed July 12, 2017 10:22 AM

    The graceful option as noted by Panagiotis Chavariotis is the closest thing to reloading the config files without a restart.  That option allows the server process to restart and re-read the config files without terminating existing http connections.  The server allows those processes to "gracefully" finish before terminating the threads and corresponding process id's.  All new http connections are handled by the new process(s)



  • 6.  RE: refresh the httpd.conf file configuration changes with out restart of IBM Http server

    Posted Wed July 12, 2017 10:32 AM

    Reloading the plugin.xml file is something completely different and happens automatically. 
    The graceful (restart) option is the best option you have to reload the httpd.config file

    Kind Regards,
    Fabio