I’m newbie in Memcached. By defualt, I know that the minimum item size is 1MB. However, I want to increase this value to 4MB because I’ve got an item with 2.8MB size.
Following some instructions I have edited my /etc/memcached.conf file and add this entry: -I 4MB
After add this entry, I have saved the file and restart memcached with:
sudo service memcached restart
Checking the variable of configuration with this command:
echo "stats settings" | nc localhost 11211
I can see that the value of item_size_max setting to 4MB (4194304)
But, If I try to load information in memcached after restart the server, I’v got an error when I try to insert an item with more than 1MB.
What am I doing wrong in my configuration? How can I add items to memcached with more than 1MB of size?
My memcached version is:
2
Answers
Due to answer of @Will from Increase Memcached Max Item Size
You could try in command prompt
-u is used to specify the user under which Memcached should run
Or
Where:
-d memcached using this flag, it runs in the background as a service
-m Maximum memory used by memcached
The memcached package has a bunch of default props so you need to set the
maxValue
to 4m too. Passing in an options object when setting up the client will do the job:Or you can do this globally: