mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 08:38:27 -05:00
Default memory limit for 32bit instanced moved from 3.5 GB to 3 GB.
In some system, notably osx, the 3.5 GB limit was too far and not able to prevent a crash for out of memory. The 3 GB limit works better and it is still a lot of memory within a 4 GB theorical limit so it's not going to bore anyone :-) This fixes issue #711
This commit is contained in:
parent
acfe3675e3
commit
c2661ed761
@ -1349,11 +1349,11 @@ void initServer() {
|
|||||||
|
|
||||||
/* 32 bit instances are limited to 4GB of address space, so if there is
|
/* 32 bit instances are limited to 4GB of address space, so if there is
|
||||||
* no explicit limit in the user provided configuration we set a limit
|
* no explicit limit in the user provided configuration we set a limit
|
||||||
* at 3.5GB using maxmemory with 'noeviction' policy'. This saves
|
* at 3 GB using maxmemory with 'noeviction' policy'. This avoids
|
||||||
* useless crashes of the Redis instance. */
|
* useless crashes of the Redis instance for out of memory. */
|
||||||
if (server.arch_bits == 32 && server.maxmemory == 0) {
|
if (server.arch_bits == 32 && server.maxmemory == 0) {
|
||||||
redisLog(REDIS_WARNING,"Warning: 32 bit instance detected but no memory limit set. Setting 3.5 GB maxmemory limit with 'noeviction' policy now.");
|
redisLog(REDIS_WARNING,"Warning: 32 bit instance detected but no memory limit set. Setting 3 GB maxmemory limit with 'noeviction' policy now.");
|
||||||
server.maxmemory = 3584LL*(1024*1024); /* 3584 MB = 3.5 GB */
|
server.maxmemory = 3072LL*(1024*1024); /* 3 GB */
|
||||||
server.maxmemory_policy = REDIS_MAXMEMORY_NO_EVICTION;
|
server.maxmemory_policy = REDIS_MAXMEMORY_NO_EVICTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user