Memcache错误:无法从流(0)数组读取行 [英] Memcache error: Failed reading line from stream (0) Array

查看:80
本文介绍了Memcache错误:无法从流(0)数组读取行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们的服务器承受任何重大负载时,我得到以下错误的一些变化.我已经在Google上搜索了数小时,并尝试了所有方法(包括升级到最新版本和全新安装).我已经在SA上阅读了有关它的所有文章,但无法弄清楚.很多人都遇到同样的问题,但是似乎没人能给出明确的答案.任何帮助将不胜感激.预先感谢.

I get some variation of the following error when our server gets put under any significant load. I've Googled for hours about it and tried everything (including upgrading to the latest versions and clean installs). I've read all the posts about it here on SA, but can't figure it out. A lot of people are having the same problem, but no one seems to have a definitive answer. Any help would be greatly appreciated. Thanks in advance.

致命错误:未捕获的异常 带有消息的"Zend_Session_Exception" 'Zend_Session :: start()- /var/www/trunk/library/Zend/Cache/Backend/Memcached.php(Line:180): 错误8:Memcache :: get()[memcache.get]: 服务器本地主机(TCP 11211)失败 与:流中的读取行失败 (0)数组

Fatal error: Uncaught exception 'Zend_Session_Exception' with message 'Zend_Session::start() - /var/www/trunk/library/Zend/Cache/Backend/Memcached.php(Line:180): Error #8 Memcache::get() [memcache.get]: Server localhost (tcp 11211) failed with: Failed reading line from stream (0) Array

我们拥有生产环境的副本以进行测试,在开始进行负载测试之前,一切工作都很好.我认为存储的最大对象大约为170KB,但是说完之后,可能大约为500KB(远低于1MB的限制).仅供参考:Memcache每次页面加载大约被命中10-20次.这是内存缓存设置:

We have a copy of our production environment for testing and everything works great until we start load-testing. I think the biggest object stored is about 170KB, but it will probably be about 500KB when all is said and done (well below the 1MB limit). Just FYI: Memcache gets hit about 10-20 times per page load. Here's the memcached settings:

PORT ="11211"
USER ="memcached"
MAXCONN ="1024"
CACHESIZE ="64"
OPTIONS ="

PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="64"
OPTIONS=""

我正在用2.2.6的PHP-memcache模块运行Memcache 1.4.5. PHP是版本5.2.6.来自php -i的内存缓存详细信息:

I'm running Memcache 1.4.5 with version 2.2.6 of the PHP-memcache module. PHP is version 5.2.6. memcache details from php -i:

内存缓存

内存缓存支持=>已启用
活动的持久连接=> 0
版本=> 2.2.6
修订=> $修订:303962 $

指令=>本地值=>主值
memcache.allow_failover => 1 => 1
memcache.chunk_size => 8192 => 8192
memcache.default_port => 11211 => 11211
memcache.default_timeout_ms => 1000 => 1000
memcache.hash_function => crc32 => crc32
memcache.hash_strategy =>标准=>标准
memcache.max_failover_attempts => 20 => 20

memcache

memcache support => enabled
Active persistent connections => 0
Version => 2.2.6
Revision => $Revision: 303962 $

Directive => Local Value => Master Value
memcache.allow_failover => 1 => 1
memcache.chunk_size => 8192 => 8192
memcache.default_port => 11211 => 11211
memcache.default_timeout_ms => 1000 => 1000
memcache.hash_function => crc32 => crc32
memcache.hash_strategy => standard => standard
memcache.max_failover_attempts => 20 => 20

谢谢大家

推荐答案

每页加载10-20次?然后尝试使用持久连接. 我还将尝试运行第二个memcached实例并将其添加到池中.

10-20 times per page load? Try using persistent connections, then. I would also try running a second memcached instance and add it to the pool.

这篇关于Memcache错误:无法从流(0)数组读取行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆