Redis服务启动并立即在Windows中停止

时间:2015-07-27 22:54:24

标签: windows redis windows-server-2008-r2

我试图在Windows Server 2008中运行Redis https://msopentech.com/opentech-projects/redis/

我已将它安装在多台机器中,所有这些都可以正常工作。 我还尝试过使用多次登录:管理员帐户,本地系统,网络服务,但都没有。

我得到的确切信息是:

The Redis service on Local Computer started and then stopped.
Some services stop automatically if they are not in use by other services or programs.

我也尝试从命令行启动服务,但我得到的只是:

[3472] 27 Jul 17:51:45.375 # Redis service failed to start.

EventViewer中没有日志。

1 个答案:

答案 0 :(得分:7)

由于Komrade P在评论中指出存储问题,Redis没有启动。 我只有16GB高清和8GB内存。根据Redis的说法,凭借8GB的内存,你需要24GB的可用空间。

我更改了maxheap,heapdir和maxmemory的值以使其工作。 基本上我的问题在配置文件中解释:

# *** There must be disk space available for this file in order for Redis 
# to launch. *** The default configuration places this file in the local 
# appdata directory. If you wish to move this file to another local disk,
# use the heapdir flag as described below.

# 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.