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

Comments

0 comments

Article is closed for comments.