3

It's been a week that our 2 websites are in production using a redis server for php and html caching. Time to time we get some errors like those :

> 22.php:2013-06-22 15:09:00 --- ERROR: +++ protocol error, got '"' as reply type byte
> 22.php:2013-06-22 15:09:00 --- ERROR: +++ protocol error, got '"' as reply type byte
> 22.php:2013-06-22 15:09:16 --- ERROR: +++ protocol error, got '<' as reply type byte
> 22.php:2013-06-22 15:09:51 --- ERROR: +++ protocol error, got '<' as reply type byte
> 22.php:2013-06-22 15:10:31 --- ERROR: +++ protocol error, got '<' as reply type byte
> 22.php:2013-06-22 15:11:22 --- ERROR: +++ protocol error, got '<' as reply type byte

If I restart the apache on the server the server stop for a few days ... Then after like 3 or 4 days it come back again.

We are using phpredis 2.2.2 with a php 5.4.14, I'm using pconnect and php is compiled with thread safe on (might be the problem) Redis server is 2.6.12 and for security reason we are going through a haproxy (configured with tcp mode)

I was wondering if you have any idea why it's happening and how to resolve that.

Thanks in advance

4

2 回答 2

0

Github 上的这个问题看起来与您发生的事情相似。

记录收到该错误时发生的 Redis 命令,然后验证它们是否有效。如果这只是无效 Redis 命令的错误消息,我不会感到惊讶。

在一个单独但相关的说明中:停止使用 phpredis。Predis做同样的事情并且有更好的支持和更大的用户社区。

于 2013-06-24T17:51:21.630 回答
0

不要使用 predis,因为它比 phpredis 慢得多。在这里查看例如:http ://alekseykorzun.com/post/53283070010/benchmarking-memcached-and-redis-clients

于 2013-08-29T09:25:48.883 回答