gpt4 book ai didi

ruby-on-rails - Rails + Dalli 内存缓存 gem : DalliError: No server available

转载 作者:行者123 更新时间:2023-12-02 22:58:18 25 4
gpt4 key购买 nike

您好,我在服务器上设置 Rails 项目时遇到问题,因为 apache 不断提示

DalliError: No server available

我安装了memcached在我的 ubuntu 机器上,但它仍然不起作用。我的 Rails 项目还有 config.cache_store = :dalli_store, 'localhost:11211', { :namespace => "production" }在环境/生产.rb 中。我该如何调试这个?

我的日志在每个请求之前显示:

localhost:11211 failed (count: 6)
DalliError: No server available

telnet 至 11211:

    root@s2:/usr/local/www/production/current/log# telnet localhost 11211
Trying 127.0.1.1...
telnet: Unable to connect to remote host: Connection refused

最佳答案

我也遇到了同样的问题。首先我安装了 memcached 作为 gemgem 安装 memcached并收到错误“DalliError:没有可用的服务器”

然后我通过以下方式安装了memcachedsudo apt-get install memcached。现在工作正常。

关于ruby-on-rails - Rails + Dalli 内存缓存 gem : DalliError: No server available,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18497502/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com