Redis服务不会在Windows上启动

时间:2015-10-27 13:57:11

标签: windows-7 redis windows-services

当我尝试启动redis服务时,我不断收到此错误:

"本地计算机上的Redis服务已启动然后停止。如果某些服务未被其他服务或程序使用,则会自动停止服务#34;。

enter image description here

唯一有效的方法是重新启动计算机,然后redis服务在启动时运行。 是否需要设置任何配置以使其更好地工作? 我使用.msi版本2.8.2104安装了redis。

非常感谢所有帮助!感谢

3 个答案:

答案 0 :(得分:1)

在 Window Services 中右键单击该服务,然后转到“属性”。然后转到登录选项卡并选择本地系统帐户。单击“确定”按钮并启动服务。

答案 1 :(得分:0)

对于那些可能有类似问题的人(就像我们一样),我找到了另一种解决方案。

我们正在运行的计算机(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>

所以我把它设置为一个合理的值,服务就开始了。

答案 2 :(得分:0)

我发现配置(ini)发生读写错误 请检查INI中指定的所有文件和目录。