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:
-
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 -
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 -
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 -
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.