. Since the partner has never provided access permissions to the redis server, only the permissions of the redis instance are available. By checking the redis configuration parameters provided by the partner's O M colleagues, we found that they set maxmemory 2 GB to limit the maximum memory usage of a single
PhenomenonAn exception occurred in the log:' MaxMemory 'ReasonThe memory is full, no more data is allowed, and you can view the details of Redis via REDIS-CLI 127.0 . 0.1 : 6379 > info memory# memoryused_memory: 4120248 used_memory_human: 3.93m used_memory_rss: 11509760 used_memory_peak: 1977983104 used_memory_peak_human: 1 .84gused_memory_lua: 36864
Some methods of freememory,totalmemory,maxmemory in the runtime class Java Virtual machine THREADJVM recently saw some people on the internet discussing Freememory () in Java.lang.Runtime class , TotalMemory (), maxmemory () Some of the problems of these methods, many people are puzzled, why, when the Java program just started up freememory () This method returns only one or two megabytes, and as the Java p
Recently seen on the Internet some people discussed the Java.lang.Runtime class in the Freememory (), TotalMemory (), maxmemory () Some of the problems of these methods, many people feel very puzzled, why, When the Java program just started up freememory () This method returns only one or two megabytes, and as the Java program runs forward, creating a lot of objects, freememory () The return of this method is sometimes not only not reduced, but will i
I recently saw some people discussing Java on the Internet. lang. many people are wondering why freememory (), totalmemory (), and maxmemory () in the runtime class, when the Java Program is started, the freememory () method returns only one or two megabytes, and as the Java program runs forward, A lot of objects have been created. The return value of the freememory () method is sometimes not reduced, but increased. These people should have some mis
Recently on the Internet to see some people discussed in the Java.lang.Runtime Class Freememory (), TotalMemory (), maxmemory () Some of the topics of these methods, many people feel very confused, why, When the Java program just started up freememory () This method returns only one or two megabytes, and as the Java program runs forward, creating a lot of objects, freememory () The return of this method is sometimes not only not reduced, but will incr
Turn from: http://wenku.baidu.com/link?url=hXtN8gFyOn4c-J7vkW-YKO1Hq4dgKYkwCIdE3s3BzwG6ZqwDAKyZ8-ZhlmOz_ Fdpaqawjqpuz544g5c-nfjjnains-pkaezjjbftcvrqakq
Recently on the Internet to see some people to discuss the Java.lang.Runtime class Freememory (), TotalMemory (), maxmemory () Some of the topics of these methods, many people are puzzled, why, When the Java program was just started Freememory () This method returned only one or two megabytes, and as t
multiple fields. As described in the preceding example, the hash structure should contain the attributes of a single object or various materials of a single user. The operation commands of the hash structure are hset (Key, fields, value) and hget (Key, field), which can be used to store or retrieve the specified field from the hash.
Set the key expiration time. One simple way to reduce memory usage is to ensure that the key expiration time is set whenever the object is stored. If the key is us
config name to an empty string:
Copy Code code as follows:
Rename-command CONFIG ""
Note, however, that if you use the AoF method for data persistence, or if you need to communicate with the Redis, changing the name of the directive may cause problems.
"Teach you to understand Redis configuration-Restrictions"
We can set Redis how many
how many new Key-value are created per second, you can adjust the survival time of the key and specify thresholds to limit the maximum memory used by Redis.
Recycle key. In a Redis configuration file (commonly called redis.conf), setting the value of the "MaxMemory" property limits the maximum amount of memory used by Redi
hash.
Sets the expiration time of the key. A simple way to reduce memory usage is to ensure that key expiration time is set whenever the object is stored. If key is used for a definite time period, or if the old key is unlikely to be used, the Redis Expiration Time command (Expire,expireat, Pexpire, pexpireat) can be used to set the expiration time, This allows Redis to automatically delete key when the
is deleted in time, so Redis will periodically proactively eliminate a batch of expired key
Active cleanup policy is triggered when current memory exceeds maxmemory limit
Passive deletionOnly when a key is manipulated (such as get) does Redis passively check if the key is out of date, delete it if it expires, and return nil.1, this deletion policy is fr
not need sudo)
After the installation is complete, copy the configuration file redis. conf to make it easier to use.
Sudo mkdir/etc/redis/Sudo cp redis. conf/etc/redis/
Start redis and check the startup method:
Redis-server
Redis (32 is because Redis retains 32 fd for internal logic ). When the maximum number of connections supported by Redis is reached, the new connection will be closed, and the corresponding client will receive an error message "max number of clients reached.
2) maxmemory
Configure the maximum memory occupied by the
user does not see the bull's message for days in a row, its corresponding Redis A set set contains a large number of bizid. TPN has a total of 6 Redis machines, 5 Redis instances on each machine, maxmemory for each instance is set to 1G, and a total of 30G of memory is used to store message Bizid. In the early days of
that requires more # memory to the command. For example, SET and LPUSH, but will continue to respond to read-only commands like Get. # This option is usually useful when Redis is used as the LRU cache or when a hard memory limit is set for the instance (using the "noeviction" policy. # Warning: when multiple slave instances are connected to an instance that has reached the memory limit, the master node is required to synchronize the slave output buff
"noeviction)# Set the maximum memory. When the maximum memory is reached, Redis will first try to clear expired or expiring keys. After this method is processed, any of them will reach the maximum memory setting, no more write operations can be performed.# Maxmemory 256000000 allocates MB of memory# Maxmemory # Memory Policy: if the memory limit is reached, how
)
After maxmemory Whether appendonly records logs after each update operation. If it is not enabled, data may be lost for a period of time during power failure. Because redis synchronizes data files according to the save conditions above, some data will only exist in the memory for a period of time. The default value is no.
Appendfilename: update the log file name. The default value is appendonly. aof (comm
Reprint: http://fanshuyao.iteye.com/blog/2384074First, Redis:Https://github.com/MicrosoftArchive/redis/releases1, Redis-x64-3.2.100.msi for the installation version2, Redis-x64-3.2.100.zip for compression packageSecond, because I use the installation version, this issue is also the installation version of the problem1, after the installation of the directory2. Th
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.