bug描述
The Windows version of Redis allocates a memory mapped heap for sharing with the forked process used for persistence operations. In order to share this memory, Windows allocates from the system paging file a portion equal to the size of the Redis heap. At this time there is insufficient contiguous free space available in the system paging file for this operation (Windows error 0x5AF). To work around this you may either increase the size of the system paging file, or decrease the size of the Redis heap with the --maxheap flag.Sometimes a reboot will defragment the system paging file sufficiently for this operation to complete successfully.
译文:
Windows版本的Redis分配了一个内存映射堆,用于与用于持久性操作的分叉进程共享。为了共享这些内存,Windows从系统分页文件中分配了与Redis堆大小相等的部分。此时,系统分页文件中没有足够的连续可用空间来执行此操作(Windows错误0x5AF)。为了解决这个问题,您可以增加系统分页文件的大小,或者使用—maxheap标志减少Redis堆的大小。有时,重新启动将对系统分页文件进行充分的碎片整理,以使此操作能够成功完成。
解决方案:
因为系统分配内存不足引起的,可以通过添加启动参数解决:
redis-server.exe redis.windows.conf --maxheap 1gb
maxheap参数可以带单位也可以不带单位,不带单位默认为字节。