打开Redis服务器时出错

Han*_*ana 4 nosql redis

我在Windows上下载Redis 2.8.19,它运行正常.但在我重新启动计算机后,我尝试打开它并显示错误:

Redis打开服务器错误

[] 5880] 15月15日:42:12.227 #Windows版本的Redis分配一个大内存映射文件,用于与持久性操作中使用的分叉进程共享堆.此文件将在当前工作目录中创建,或者由.conf文件中的'heapdir'指令指定的目录创建.Windows报告此文件没有足够的可用磁盘空间(Windows错误0x70).

您可以通过使用--maxheap标志减小Redis堆的大小,或者将堆文件移动到具有足够空间的本地驱动器来解决此问题.有关--maxheap和--heapdir标志的更多详细信息,请参阅二进制发行版附带的文档.

Redis无法继续.退出.

我找不到堆文件,也不知道如何减小Redis堆的大小.谢谢 !

Han*_*ana 7

在fork()操作期间,总页面文件提交将最大化:

(size of physical memory) + (2 * size of maxheap)
Run Code Online (Sandbox Code Playgroud)

例如,在具有8GB物理RAM的计算机上,具有默认maxheap大小的最大页面文件提交将是(8)+(2*8)GB或24GB.

如果您没有向Redis提供任何提示,则会出现类似于以下内容的错误:

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.
Run Code Online (Sandbox Code Playgroud)

要解决此限制,请在启动Redis时使用与您的计算机相关的值指定-maxheap标志:

redis-server –-maxheap 1gb
Run Code Online (Sandbox Code Playgroud)

链接:在开发环境中本地安装Redis缓存