您现在的位置是:首页 > 文章详情

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

日期:2020-03-13点击:460

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 installed http://try.redis.io there. 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.
via https://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.
via https://twitter.com/antirez/status/1238132885762211841

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

Today http://Redis.io went down for some time, sorry about this problem, http://Redis.io is 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.
via https://twitter.com/antirez/status/1238132866682359813

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

原文链接:https://www.oschina.net/news/114051/redis-io-cannot-connect-redis
关注公众号

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。

持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。

转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。

文章评论

共有0条评论来说两句吧...

文章二维码

扫描即可查看该文章

点击排行

推荐阅读

最新文章