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

Lint_
  • 1,391
  • 3
  • 12
  • 10

2 Answers2

0

This issue on Github looks similar to what was happening to you.

Log your Redis commands that happen when that error is received and then verify they're valid. I wouldn't be surprised if this is just a bad error message for an invalid Redis command.

On a separate, but related note: stop using phpredis. Predis does the same things and has much better support and a bigger user community.

Eli
  • 36,793
  • 40
  • 144
  • 207
0

DO NOT use predis as it is dramatically slower to phpredis. Check here for example: http://alekseykorzun.com/post/53283070010/benchmarking-memcached-and-redis-clients

Galvani
  • 239
  • 2
  • 9