Redis官网昨日宕机,错误提示为无法连接Redis
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/1238132868137787392TLDR, 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 應用(點此查看源碼),所以已經足夠應對。
總結
以上是生活随笔為你收集整理的Redis官网昨日宕机,错误提示为无法连接Redis的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: iPhone 12 或首次配备 3D 深
- 下一篇: 甲骨文靠拷贝 IBM 的 SQL 发家致