Courant News: Maintenance Mode


04.15.09 Posted in Courant News by Max

Today’s brief post will cover Courant’s main­te­nance mode. This mode allows autho­rized staff to view and per­form work on the site while the rest of the world sees a sim­ple mes­sage inform­ing them that the site is cur­rently unavail­able. There are a num­ber of uses for such a fea­ture, which I will describe briefly.

Main­te­nance mode can be use­ful when upgrad­ing the soft­ware that the site runs on, such as a data­base or web­server, or the code for Courant or the site itself. In these cases, you’d rather the site vis­i­tors be pre­sented with an infor­ma­tive mes­sage than a poten­tially bro­ken or unre­spon­sive site. It could also be used when test­ing or imple­ment­ing new tem­plates, although ide­ally that would hap­pen on a sep­a­rate stag­ing server first.

Main­te­nance mode is engaged by a sim­ple tog­gle set­ting in the admin inter­face. By default, it uses the same tem­plate as the 500 server response page, which gets shown when some­thing is bro­ken and the server can­not ful­fill the page request. In this man­ner, when some­thing on your server breaks, users get pre­sented with a nice lit­tle mes­sage instead of see­ing the blood and guts of your server spilling out onto their pages. This is espe­cially handy when you get huge traf­fic spikes that your server can­not han­dle. For exam­ple, the YDN site cur­rently uses a page that looks like this:

YDN Maintenance Mode

Main­te­nance mode is a pretty sim­ple fea­ture, but it’s worth its weight in gold when the need arises. For those peo­ple using other CMSes, sim­i­lar func­tion­al­ity can be found in Word­press and Dru­pal, among others.



Leave a Reply