redis启动错误

1 通过命令行窗口运行redis-server,查看错误信息

2 错误信息内容为:

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. 

 

原因分析: 经过分析,原来是最大堆大小“maxheap ”配置的问题,是因为可用的内存不足,不 能满足maxheap配置的条件,所以无法启动。

解决办法: 打开Redis的配置文件“redis.windows.conf”,找到以下代码部分:

# 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>
maxheap 51200000

##2 项目启动报错

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值