gpt4 book ai didi

python - Broken Pipe 错误 Redis

转载 作者:可可西里 更新时间:2023-11-01 11:13:04 24 4
gpt4 key购买 nike

我们正在尝试通过 redis-py 包将大小为 2.3GB 的 pickled 对象设置到 redis 中。遇到以下错误。

BrokenPipeError: [Errno 32] Broken pipe

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

我想了解根本原因。是由于服务器端或客户端的输入/输出缓冲区限制吗?是因为 RESP 协议(protocol)有任何限制吗?是否允许将 2.3 Gb 的单个值(字节)存储到 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)

客户端错误

BrokenPipeError: [Errno 32] Broken pipe

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

self._sock.sendall(item)

服务器端错误

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 版本:3.2.8/64 位

最佳答案

Redis的String数据类型最大为512MB。

关于python - Broken Pipe 错误 Redis,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43204496/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com