Redis does not start
The following errors are prompted today when Redis is started:
C:\java\redis2817>redis-server.exe redis.windows.conf
[5268] APR 11:45:22.696 #
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
'll be created in the working directory or the directory specified by
The ' heapdir ' directive in the. conf file. Windows is reporting this there is
Insufficient disk space available for this file (Windows error 0x70).
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.
cause Analysis:
After analysis, the problem is the maximum heap size "maxheap" configuration, because the available memory is insufficient to meet the conditions of the MAXHEAP configuration, so it cannot be started.
Workaround:
Open the Redis configuration file "redis.windows.conf" and locate the following code section:
# The Redis heap must be larger than the value specified by the maxmemory # flag, as the heap allocator has its own memory requirements and # fragmentation of the heap is inevitable. If only the maxmemory flag is # specified, maxheap will be set at 1.5*maxmemory. If the maxheap flag is # specified along with maxmemory, the maxheap flag will be automatically # increased if it is smaller than 1.5*maxmemory. # # maxheap <bytes>51200000
The default value is: Maxheap 1024000000,
I'm doing this because the remaining available memory is too small,
So change it to: Maxheap 51200000, finally can start.
Redis could not start you can fix this problem by either reducing the size of the Redis heap with the--maxheap