Follow

Use Application Maintenance Pages

Updated:

Engine Yard provides two methods of posting a maintenance page for your application. You can control the maintenance page via the dashboard in the UI, or you can use the Engine Yard command line interface.

This document contains the following sections:

Customize maintenance messages

Enable maintenance via the dashboard (UI)

Enable maintenance via the command line (CLI)

Troubleshooting

More information

Customize maintenance messages

Engine Yard provides a default maintenance page, but you are encouraged to customize it to suit your application.

You can change your maintenance page on every deploy to give deploy-specific feedback (for example, "Database maintenance in progress - Please try again later - Thank You for your patience.").

When a rollback is performed, the maintenance page used is the one contained in the latest deploy. This prevents showing users a message from an old deploy.

When a maintenance page is requested to be displayed, Engine Yard looks for HTML files and displays them based on the following priority:

  1. public/maintenance.html.custom
  2. public/maintenance.html.tmp
  3. public/maintenance.html
  4. public/system/maintenance.html.default

Enable maintenance via the dashboard (UI)

Note: It is also possible to enable/disable maintenance mode via the CLI; commands initiated via the CLI will not be reflected in the UI.

To view the state of maintenance mode

  1. Navigate to the environment page from the Engine Yard dashboard.
  2. Scroll down to the More Option section and click Maintenance.

    Maintenance.png

  3. You can view the current state of maintenance at the top of the page.

    Note: This status indicates only maintenance requests initiated from the UI (not the CLI-initiated requests).

  4. You can view the history of maintenance requests at the bottom of the page.

    Note: This list shows only maintenance requests initiated from the UI (not the CLI-initiated requests).

To enable maintenance mode

  1. Select Enable Maintenance Mode.
  2. Select the application(s) within the environment where maintenance is required.

  3. Click Update.
  4. Navigate to your app to verify that the maintenance page appears (the web app is not available).

To disable maintenance mode

  1. Select Disable Maintenance Mode.
  2. Select the application(s) within the environment where maintenance is complete.

  3. Click Update.
  4. Navigate to your app to verify that the maintenance page no longer appears (the web app is available).

Enable maintenance via the command line (CLI)

To display or remove your maintenance pages, you can use the Engine Yard CLI by running the following commands:

  • Display your maintenance page (disables the web app and then displays the maintenance page)
    ey web disable
  • Remove your maintenance page (removes the maintenance page and enables the web app)
    ey web enable

Notes:

  • Maintenance commands initiated via the CLI will not be reflected on the maintenance page UI.
  • The CLI commands are enabling and disabling the web app; the UI commands are enabling and disabling maintenance mode (so the same words have opposite effects).
  • For more information see Deploy from the Engine Yard CLI.

Troubleshooting

This table contains troubleshooting tips related to maintenance pages.

SymptomSolution

The following message appears:

Current repository layout does not allow for maintenance pages!
Web traffic may still be served to your application.
Expected a symlink at 'public/system'
To use maintenance pages, remove 'public/system' from your repository.
Delete the 'system' folder from your application repository and re-deploy in order to use the maintenance page.
The maintenance state list shows that maintenance is enabled for my app, but it is not (the web app is available). Maintenance was probably controlled via the CLI.
The maintenance state list shows that maintenance is disabled for my app, but it is not (the web app is not available). Maintenance was probably controlled via the CLI.

More information

This table provides other resources related to maintenance pages.

For more information about...See...
Introduction to upgrade and related tools                     Upgrade Guide
Engine Yard CLI Engine Yard command line interface

If you have feedback or questions about this page, add a comment below. If you need help, submit a ticket with Engine Yard Support.

Was this article helpful?
6 out of 7 found this helpful
Have more questions? Submit a request

Comments

  • Avatar
    Eric Lund

    The commands listed above are backwards. It should be:

    • Enable your maintenance page: ey web disable
    • Disable your maintenance page: ey web enable
  • Avatar
    Keri Meredith

    Hi Eric, thanks for pointing that out. Those 2 lines were a little confusing, so I tried rewording (and providing a little more info in parenthetical notes). Hopefully that corrects and clarifies for all.

    Thanks again for helping to keep the docs up to date. kjm

  • Avatar
    Dan Draper

    Hi guys,

    Is there any way that we can display a page from an external site? Eg; http://codehire.statushub.io?

  • Avatar
    Keri Meredith

    Hi Dan, sorry for the belated reply. Just asked and our Support dudes say - 

    It's probably going to require some customization - they can contact support and we can help them do it. I think it'll be possible.

    Good luck! kjm

  • Avatar
    Peter Kamali

    Hi, images and css requests from our maintenance page are also getting redirected to the maintenance page, meaning not styles or images. Is there some way around this other than hosting the images and css off-site? Thanks

Powered by Zendesk