在Windows服务中右键点击该服务并进入Properties。然后转到Log On选项卡,并选择本地系统帐户。单击Ok按钮并启动服务。
对于那些可能有类似问题的人(就像我们一样),我找到了另一种解决方案。
我们正在运行的机器(TEST)只有驱动器上的7GB
可用空间。但我们有16GB
的RAM。在我们的redis.windows.conf
文件中,有一个名为maxheap
的设置未设置。
根据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. During
# fork() operations the total page file commit will max out at around:
#
# (size of physical memory) + (2 * size of maxheap)
#
# For instance, on a machine with 8GB of physical RAM, the max page file
# commit with the default maxheap size will be (8)+(2*8) GB , or 24GB. The
# default page file sizing of Windows will allow for this without having
# to reconfigure the system. Larger heap sizes are possible, but the maximum
# page file size will have to be increased accordingly.
#
# 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>
所以我将其设置为合理的值,服务立即启动。
redis.windows.conf
的文件。有什么建议吗? - bjanredis.windows.conf
文件位于Redis
的根目录中。但是,我承认我没有在那个服务器上安装Redis,所以可能是其他人手动创建了该文件。我相信你只需要这5个exe
文件和一个配置文件就可以了。你应该能够在网上找到一个示例配置文件。 - cbmeeks我发现配置文件(ini)上有读写错误,请检查 INI 中指定的所有文件和目录。
maxheap
设置。我将其设置为 2GB,然后它开始正常工作! - Gustav