Home > Backend Development > PHP Tutorial > phpredis - php连接redis报错Redis server went away

phpredis - php连接redis报错Redis server went away

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:50:33
Original
3131 people have browsed it

我的项目用到了redis,上线后发现经常报Redis server went away错误或者read error on connection,查了一些资料也没有头绪,但连接方式从connect转为pconnect就不报错误了,但怕以后用户多了会出问题,各位大大们有什么解决方案吗?
目前网站pv20万uv不到3万
用的是phpredis扩展

回复内容:

我的项目用到了redis,上线后发现经常报Redis server went away错误或者read error on connection,查了一些资料也没有头绪,但连接方式从connect转为pconnect就不报错误了,但怕以后用户多了会出问题,各位大大们有什么解决方案吗?
目前网站pv20万uv不到3万
用的是phpredis扩展

你的redis服务器有几台?
redis服务的连接数达到了多少?
redis服务器的负载如何?

从这几方面去排除问题

需要看看用来跑redis服务器的内存是多少,redis填充数据后内存占用有多少了。
如果内存使用达到1,2G,写入又比较频繁时,redis保存数据到磁盘时会占用cpu和i/o拖慢系统的。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template