On rare occasions we have seen Redis v2.4.17 instances with invalid data in the INFO response: used_memory_peak_human:\x90\f\x83\xFB\x83\u007F
The 'used_memory_peak_human' key should be a string on the form "12345.67K". For our instance the used_memory_peak:18446744073706301432 is very big, and looking at redis.c (for both 2.4.17 and 2.6.7) I suspect that bytesToHuman() is buggy and doesn't deal with such big values.
This patch simply downgrades the info string to ASCII when the encoding is invalid.
Downgrade INFO string to ASCII if it contains invalid UTF-8 chars
Shouldn't this be addressed in Redis itself then?
It should: antirez/redis#858
This change removes all invalid characters, so the INFO response you end up with is not really usable. I agree with @djanowski that this should be fixed in Redis itself and that redis-rb should not make an attempt to fix this bad behavior.
Closing the issue.