I am using the command line interface on my mac terminal to set a long string.
SET mystring "[long string]"
Now the issue is this. When i copy from my text editor the long string into the cli, the pasted string gets cut off at 4,066 characters.
I thought it could be the copy/paste buffer size of the mac terminal but i can paste stings alot longer outside of redis-cli.
And its no where near the 512 Megabytes limit for a STRING in redis.
This is similar to another questions but not the same steps. Redis cuts of the string when getting a serialized object back. Cant find any limits
thanks!
Is there a upper limit to the suggest size of the value stored for a particular key in redis? 512MB is the current limit for Strings.
Redis supports 5 types of data types.
In Redis, we have the advantage of storing both strings and collections of strings as values. A string value cannot exceed 512 MB of text or binary data. However, it can store any type of data, like text, integers, floats, videos, images, and audio files.
Creating and Managing Strings However, strings in Redis are binary-safe, meaning a Redis string can hold any kind of data, from alphanumeric characters to JPEG images. The only limit is that strings must be 512 MB long or less.
redis-cli uses linenoise custom library for terminal input, which happens to have hard-coded input buffer size of 4096 bytes: linenoise.c:101. You may want to write down your Redis command into a file and execute it with redis-cli --eval
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With