Why am I getting 503 error in my application during Postgres/Redis maintenance?

Issue

Eventhough preboot has been enabled, customer sees 503 error during a Postgres/Redis maintenance.

Resolution

This is expected when using preboot with multi-tenant postgres or Redis instances:

  1. We do not recommend using preboot on applications with multi-tenant Heroku Postgres or Heroku Redis plans. Single-tenant data plans have more stable addresses and include redirect features to minimize downtime when switching hosts due to a maintenance or failover.
    https://devcenter.heroku.com/articles/preboot#caveats

  2. The quick fix is to upgrade to a single-tenant redis instance. Those are premium-7 and above:
    https://devcenter.heroku.com/articles/heroku-redis-technical-characterization

  3. Dedicated plans use forwarding so that the existing open connection are redirected to the new instance. We have more details on that here:
    https://blog.heroku.com/faster-maintenances-with-heroku-postgres-and-redis-premium-plans

  4. The other option is to watch for these upgrade notifications and then perform them manually. It is also good to temporarily disabling preboot during manually-run maintenance.

Note: Even after upgrading the Premium plans, Preboot should be still enabled, as the single-tenant data plans have more stable addresses and include redirect features to minimize downtime when switching hosts due to maintenance or failover.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support