私はかなり長い間このエラーに苦労してきました:
Redis::ProtocolError: Got 'i' as initial reply byte.
If you're running in a multi-threaded environment, make sure you pass the :thread_safe
option when initializing the connection. If you're in a forking environment, such as
Unicorn, you need to connect to Redis after forking.
Unicorn と Redis を使用するアプリで断続的に発生します。このredis-rb Github の問題:thread_safe
から、オプションがデフォルトで有効になっているように見えます。の最新バージョンと互換性がないredis 2.2.2
ため、使用しています。redis 3.0.1
resque
私のユニコーン設定ではRedis.current.quit
、フォーク後に使用しています。
ruote-redis
また、ワークフロー エンジン Ruote のストレージ実装である gem を使用して Redis に接続しています。
すべての Redis 接続が安定しており、アプリの通常の使用を妨げるこのエラーが発生しないようにするにはどうすればよいですか?