ERR increment or decrement would overflow: ERR increment or decrement would overflow(递增或递减将导致溢出)
Redis含义
由于结果将溢出 64 位有符号整数范围,INCR/DECR(或 INCRBY/DECRBY)被拒绝。该值将超出上限或下限。
原因
键的值非常接近 int64 上限(约 922 京),使递增/递减发生溢出、INCRBY 参数非常大,或计数器失控增长。
解决方法
将计数器值设计为保持在 int64 范围内。对于大规模计数,采用缩放或定期重置。将增量(INCRBY 参数)保持在合理范围内。如果需要非常大的值,在应用层采用其他计数策略。
同一数据库的其他条目
- NOPERMNOPERM this user has no permissions to run the command or access one of the keys(该用户无权运行此命令或访问其中某个键)
- ERR value is not an integer or out of rangeERR value is not an integer or out of range(值不是整数或超出范围)
- ERR value is not a valid floatERR value is not a valid float(值不是有效的浮点数)
- ERR max number of clients reachedERR max number of clients reached(已达到最大客户端数)
- BUSYKEYBUSYKEY Target key name already exists(目标键名已存在)
- ERR no such keyERR no such key(键不存在)
- ERR DUMP payload version or checksum are wrongERR DUMP payload version or checksum are wrong(DUMP 负载的版本或校验和错误)