💨

 【Heroku】redisのアップグレード対応

2023/05/15に公開

【Heroku】redisのアップグレード対応

ある日メールが来た

Hello 👋
We are reaching out again regarding your Redis database redis-angular-30647 on 〇〇 that requires a version upgrade.
Your Redis database redis-angular-30647 on 〇〇 is running a deprecated version (6.0.19) and will not be supported after 30 Jun, 2023.
Redis (6.0.19) will not be supported in less than a month.
We recommend upgrading your Redis database to the latest version supported by Heroku, which is currently 7.0.11. We perform heavy testing and validation work on all new Redis releases, including testing the upgrade procedure, and are careful to only recommend versions that we trust.
You can upgrade your Redis database to the latest default version by using heroku redis:upgrade command. You can read more about this procedure in our Dev Center article.
If you do not take action, we will schedule an upgrade to your Redis database on 30 May, 2023.
The upgrade will create a maintenance that will run during your next maintenance window. You can trigger it yourself beforehand by using the maintenance cli.
Please open a ticket if you have any questions about this process.
Thank you for choosing Heroku.
The Heroku Team

英語のメールは億劫だけどちゃんと対応しないと

HerokuCLIで以下を実行

heroku login

メールの中ではredis-angular-30647をアップグレードしろと来ているが一応確認

$ heroku addons:info redis-angular-30647

=== redis-angular-30647
Attachments:  〇〇::REDIS
Installed at: Thu Apr 08 2021 09:55:54 GMT+0900 (日本標準時)
Owning app:   〇〇
Plan:         heroku-redis:premium-0
Price:        $15/month
State:        created

ふむふむこのアドオンだな。じゃあバージョンは、、、と

$ heroku redis:info redis-angular-30647 -a 〇〇

=== redis-angular-30647 (REDIS_URL)
Plan:                   Premium 0
Status:                 available
Created:                2021-04-08 00:55 
Version:                6.0.17
Timeout:                300
Maxmemory:              noeviction
Maintenance:            not required
Maintenance window:     Fridays 18:00 to 22:00 UTC
Persistence:            AOF
HA Status:              Available
Requires TLS:           Yes
Keyspace Notifications: Disabled

うん、6系になっているからアップグレードしないとね

$ heroku redis:upgrade  redis-angular-30647 -v 7.0.11 -a davida-production 

WARNING: Irreversible action.
 ▸    Redis database will be upgraded to 7.0.11. This cannot be undone.
 ▸    To proceed, type davida-production or re-run this command with --confirm
 ▸    davida-production
 
 > davida-production
Requesting upgrade of redis-angular-30647 to 7.0.11... upgrade has started!

すぐには完了しないのでHerokuからアップグレードが行われているか確認


アップグレードできたか念の為チェックして完了

$ heroku redis:info redis-angular-30647 -a 〇〇

=== redis-angular-30647 (REDIS_URL)
Plan:                   Premium 0
Status:                 preparing (version upgrade in progress)
Created:                2021-04-08 00:55 
Version:                6.0.17
Timeout:                300
Maxmemory:              noeviction
Maintenance:            scheduled for 2023-05-19 18:00:00 +0000, required by 2023-06-12 03:26:40 +0000
Maintenance window:     Fridays 18:00 to 22:00 UTC
Persistence:            AOF
HA Status:              Available
Requires TLS:           Yes
Keyspace Notifications: Disabled

scheduled for 2023-05-19 18:00:00となっているからそれまで待ってればよし

=== redis-angular-30647 (REDIS_URL)
Plan:                   Premium 0
Status:                 available
Created:                2021-04-08 00:55 
Version:                7.0.11
Timeout:                300
Maxmemory:              noeviction
Maintenance:            not required
Maintenance window:     Fridays 18:00 to 22:00 UTC
Persistence:            AOF
HA Status:              Available
Requires TLS:           Yes
Keyspace Notifications: Disabled

無事Version:7.0.11になりました👏

と思いきや...

なんか出ている

heartbeat: OOM command not allowed when used memory > 'maxmemory'

Discussion