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
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?
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.
This is how to use the maxheap flag, which is more convenient then using a config file:
redis-server --maxheap 2gb
To back up Michael's response, I've had the same problem.
I had ~40GB of free space, and paging file set to 4G-8G. Redis did not want to start until I set paging file to the amount recommended by Windows themselves, which was 12GB.
Really odd beahaviour.
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