Incompatible upgrades | Maintain and update Load Balancer
Maintenance Web page for site downtimes
In the previous sections we have described techniques to apply updates without taking the site offline. Although at limited capacity, the site has still been able to server customers.
In some cases, however, the site needs to be taken offline completely to deploy application updates or to perform database maintenance. With WebSphere Commerce, this may, for example, be the case in the following situations:
- Incompatible application (EAR) updates need to applied at the application server tier. For example, new and old application versions cannot be used within one user session, and temporary server affinity from Web servers to application servers (see 27.2.3, Incompatible upgrades) cannot be configured (or is not desired).
- Necessary database schema or content updates cannot be performed while the site is being accessed and the database is in use.
If the site needs to be taken down, a temporary page should be returned to all clients upon all requests, informing the users of the maintenance in progress.
To configure this such that all user sessions can be finished first (for example, a user should be able to finish browsing and purchasing items), the Web servers should be quiesced as described in 27.2.1, Quiescing a Web server, and reconfigured one by one.
For this technique to work properly, server affinity must be configured for the Load Balancer to ensure that a user does not switch between Web servers still serving the WebSphere Commerce site and Web servers already reconfigured to show the maintenance page (see 19.3, Server affinity).
To configure a Web server to show a maintenance page:
- Quiesce the server.
- Copy your maintenance page (for example, maintenance.html) into your instance's document root directory. This is the directory configured as DocumentRoot in your httpd.conf file (for example, WC_Install_Dir/instances/Instance_Name/web).
- Modify httpd.conf:
- Find these two lines and comment them out (prepend with a #):
- Configure your maintenance.html file as an error page by adding (or modifying) the ErrorDocument directive:
- Save the httpd.conf file.
- Restart your Web server (see Restart the Web server).
After making all necessary changes at the database, application server, and Web server tiers, undo the changes described above on all Web servers, then restart the servers. Quiescing is not necessary this time, as only static content has been served and no user session has been established.
Tip: It is easier to provide a copy of the httpd.conf file that contains the changes described in step 3 above. For future upgrades requiring a site outage, instead of steps 3 and 4 above, just stop your Web server and restart it, passing the file name of the modified copy of httpd.conf as the -f parameter to apachectl.