服务器之家:专注于服务器技术及软件下载分享
分类导航

服务器资讯|IT/互联网|云计算|区块链|软件资讯|操作系统|手机数码|百科知识|免费资源|头条新闻|

服务器之家 - 新闻资讯 - 软件资讯 - Redis官网昨日宕机,错误提示为“无法连接Redis”

Redis官网昨日宕机,错误提示为“无法连接Redis”

2020-03-14 13:10开源中国 软件资讯

Redis 官网redis.io昨日罕见地 宕机 了一段时间。宕机原本不是什么新鲜事,但戏剧性的是网站的报错信息居然是连接不上 Redis。 Redis::CannotConnectError at / Error connecting to Redis on 127.0.0.1:6379 (Errno::ECONNREFUSED) ▲ 看到这,忍不住刷一句:禁

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

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

Redis官网昨日宕机,错误提示为“无法连接Redis”

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

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 at@digitalocean. 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 应用(点此查看源码),所以已经足够应对。

延伸 · 阅读

精彩推荐