首页 资讯频道 互联频道 智能频道 网络 数据频道 安全频道 服务器频道 存储频道

Redis 官网redis.io罕见宕机 报错信息连接不上 Redis

2020-03-13 11:01:57 来源 : 开源中国

Redis 官网redis.io昨日罕见地宕机了一段时间。宕机原本不是什么新鲜事,但戏剧性的是网站的报错信息居然是连接不上 Redis。

Redis::CannotConnectError at / Error connecting to Redis on 127.0.0.1:6379 (Errno::ECONNREFUSED)

▲ 看到这,忍不住刷一句:禁止套娃!

Redis 作者 Antirez 很快修复了问题,并解释了宕机的原因。原来是因为他最近在运行redis.io的实例上安装了Try Redis(用于在线体验 Redis 数据库),可能是未能对 session key 进行良好的垃圾回收,从而导致内存累积,最终因为内存溢出(OOM)引发宕机。对此,Antirez 表示这种情况只是由于实例的内存不足而导致的。所以他的解决方案也十分直接,升级为 $20/月,4G 内存的实例。另外还为 allkeys-lru 策略配置了 1GB 内存的限制。

However lately I installedhttp://try.redis.iothere. And apparently it does not garbage collect the session keys well enough or something like that. So memory accumulated and the instance quit for OOM, but this probably only happened because the instance is very low on mem.

viahttps://twitter.com/antirez/status/1238132868137787392

TLDR, today I'm going to resize it to a 4GB instance for 20$/month. Looks like a good upgrade :-D Maybe the site will be faster too, even if it was quite fast actually, already. Lessons: if you use Redis as your store, you can do a lot with very little.

viahttps://twitter.com/antirez/status/1238132885762211841

我们也由此得知一个出乎大家意料的情况,Redis 官网居然运行在一台仅$5/月,内存 1G 的 DigitalOcean 虚拟主机(Droplet)上,这也是 DigitalOcean 提供的最低(标准)配置。

Todayhttp://Redis.iowent down for some time, sorry about this problem,http://Redis.iois running in a $5 / month droplet [email protected] I was a bit too cheap on that :-) But since it uses Redis as its main store + a Ruby app, this was enough.

viahttps://twitter.com/antirez/status/1238132866682359813

Antirez 解释道,选择这么便宜的配置是因为这台主机使用了 Redis 作为持久存储,并且只跑了一个 Ruby 应用(点此查看源码),所以已经足够应对。

相关文章

最近更新