Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Broken Pipe Error Redis

We are trying to SET pickled object of size 2.3GB into redis through redis-py package. Encountered the following error.

BrokenPipeError: [Errno 32] Broken pipe

redis.exceptions.ConnectionError: Error 104 while writing to socket. Connection reset by peer.

I would like to understand the root cause. Is it due to input/output buffer limitation at server side or client side ? Is it due to any limitations on RESP protocol? Is single value (bytes) of 2.3 Gb allowed to store into Redis ?

import redis

r = redis.StrictRedis(host='10.X.X.X', port=7000, db=0)

pickled_object = pickle.dumps(obj_to_be_pickled)

r.set('some_key', pickled_object)

Client Side Error

BrokenPipeError: [Errno 32] Broken pipe

/usr/local/lib/python3.4/site-packages/redis/connection.py(544)send_packed_command()

self._sock.sendall(item)

Server Side Error

31164:M 04 Apr 06:02:42.334 - Protocol error from client: id=95 addr=10.2.130.144:36120 fd=11 name= age=0 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=16384 qbuf-free=16384 obl=42 oll=0 omem=0 events=r cmd=NULL

31164:M 04 Apr 06:07:09.591 - Protocol error from client: id=96 addr=10.2.130.144:36139 fd=11 name= age=9 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=40 qbuf-free=32728 obl=42 oll=0 omem=0 events=r cmd=NULL

Redis Version : 3.2.8 / 64 bit

like image 803
chandu Avatar asked Dec 18 '22 08:12

chandu


1 Answers

Redis' String data type can be at most 512MB.

like image 81
Itamar Haber Avatar answered Dec 21 '22 11:12

Itamar Haber