【问题标题】:PHP application in cloud sites not able to access the memcached running at cloud server - rackspace云站点中的 PHP 应用程序无法访问在云服务器上运行的 memcached - rackspace
【发布时间】:2013-01-18 12:54:12
【问题描述】:

我在 rackspace 云站点中运行一个 php 应用程序 (Yii)。我已经在运行的 rackspace 云服务器上安装了一个 memcached 服务器。问题,我无法访问内存缓存。我收到以下错误

Memcache::get() [<a href='memcache.get'>memcache.get</a>]: Server xx.xx.xxx.xxx (tcp 11211) failed with: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (10060)

netstat -an | grep ":11211"
tcp        0      0 0.0.0.0:11211               0.0.0.0:*     LISTEN
tcp        0      0 :::11211                    :::*          LISTEN
udp        0      0 0.0.0.0:11211               0.0.0.0:*                                                                                                              
udp        0      0 :::11211                    :::*           

请在main.php找到缓存配置

'cache'=>array(
        'class'=>'system.caching.CMemCache',
        'servers'=>array(
            array('host'=>' xx.xx.xxx.xxx', 'port'=>11211, 'weight'=>60),
        ),
    ),

如何让它发挥作用?

【问题讨论】:

    标签: php yii memcached rackspace


    【解决方案1】:

    您是否尝试过通过 iptables 打开端口 11211?我不知道您使用的是哪个发行版,但这里有几个教程:

    此外,由于您在 Rackspace 工作,因此您很可能能够通过实时聊天联系到可以提供帮助的工程师。我一直发现它们确实很有帮助!

    【讨论】:

    • 感谢您的回复。我安装了centOS 6 发行版。我将浏览链接并回复您。我与支持团队进行了交谈,但解决方案没有帮助。
    猜你喜欢
    • 2014-04-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-21
    • 1970-01-01
    • 2023-04-06
    • 2015-10-23
    • 1970-01-01
    相关资源
    最近更新 更多