Custom Error Pages
Our routers may return an error page in various cases, when an application is unreachable:
- There is no running container.
- The application has no web container running but other types of containers are.
- The application crashed or cut the connection unexpectedly.
- The application timed out.
In these cases, Scalingo’s routers return an error page like the following:
You can customize these pages by modifying the following environment variables:
The usage is the following:
In order to prevent the page to be fetched at each request, the content is cached in the router’s memory. Hence we limit the size of this page to 10MB.
Custom Maintenance Page
SCALINGO_NO_FRONT_ERROR_URL environment can be used to display a specific
page when an application is in maintenance. Here are the steps:
- Set the
SCALINGO_NO_FRONT_ERROR_URLenvironment variable to point to a valid URL containing the maintenance page.
- Scale down the
webcontainers to 0.
- Execute all the operations needed for as long as you need. During this step, the maintenance page will be displayed for any request to the application.
- Scale back up the
webcontainers to the original value.