Use Application Maintenance Pages

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.

Symptom Solution

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.

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
    0
    Comment actions Permalink
  • Avatar
    Permanently deleted user

    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

    0
    Comment actions Permalink
  • Avatar
    Permanently deleted user

    Hi guys,

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

    0
    Comment actions Permalink
  • Avatar
    Permanently deleted user

    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

    0
    Comment actions Permalink
  • 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

    1
    Comment actions Permalink
  • Avatar
    56193 43171

    To all who come hence with a custom web root folder name,

    Above when they say "public" folder. They literally mean a folder called "public" and not your custom web root folder.

    Cheers!

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk