Redis server can't run more than 1024M maxheap

Asger Vestbjerg picture Asger Vestbjerg · Feb 25, 2015 · Viewed 16.1k times · Source

I am running Redis 2.8.19 on Windows Server 2008. I get an error saying that I have insufficient disc space for my Redis heap. (The memory mapping file instead of fork()).

I can only get Redis running, if I have 'maxheap 1024M' in the cfg, even though I have ~50GB of free space on the directory I have set 'heapdir' to.

If I try to run it with higher maxheap, or with no maxheap, I get this error (PowerShell):

PS C:\Users\admasgve> cd D:\redis-2.8.19

PS D:\redis-2.8.19> .\redis-server.exe

[7476] 25 Feb 09:32:38.419 # The Windows version of Redis allocates a large memory mapped file for sharing the heap with the forked process used in persistence operations. This file will be created in the current working directory or the directory specified by the 'heapdir' directive in the .conf file. Windows is reporting that there is insufficient disk space available for this file (Windows error 0x70).

You may fix this problem by either reducing the size of the Redis heap with the --maxheap flag, or by moving the heap file to a local drive with sufficient space. Please see the documentation included with the binary distributions for more details on the --maxheap and --heapdir flags.

Redis can not continue. Exiting.

Screenshot: http://i.stack.imgur.com/Xae0f.jpg

  • Free space on D: 49,4 GB
  • Free space on C: 2,71 GB
  • Total RAM: 16 GB
  • Free RAM: ~9 GB

redis.windows.conf:

# Generated by CONFIG REWRITE
loglevel verbose
logfile "stdout"
save 900 1
save 300 10
save 60 10000
dir "D:\\redis-2.8.19"
maxmemory 1024M
# maxheap 2048M
heapdir "D:\\redis-2.8.19"

Everything beside the last 3 lines are generated by redis with the 'CONFIG REWRITE' cmd. I have tried various things, with maxmemory, maxheap and heapdir.

From Redis documentation:

maxmemory / maxheap - the maxheap flag controls the maximum size of this memory mapped file, as well as the total usable space for the Redis heap. Running Redis without either maxheap or maxmemory will result in a memory mapped file being created that is equal to the size of physical memory; The Redis heap must be larger than the value specified by the maxmemory

Have anybody encountered this problem before? What do I do wrong?

Answer

adotout picture adotout · May 31, 2015

Redis doesn't use the conf file in its home directory by default. You have to pass the file in on the command line:

.\redis-server.exe redis.windows.conf

This is what is in my conf file:

maxheap 2048M
heapdir D:\\redisheap

These settings resolved my issue.