Redis无法启动

Redis突然奔溃,不能正常启动

bug描述

The Windows version of Redis allocates a memory mapped heap for sharing with the forked process used for persistence operations. In order to share this memory, Windows allocates from the system paging file a portion equal to the size of the Redis heap. At this time there is insufficient contiguous free space available in the system paging file for this operation (Windows error 0x5AF). To work around this you may either increase the size of the system paging file, or decrease the size of the Redis heap with the --maxheap flag.Sometimes a reboot will defragment the system paging file sufficiently for this operation to complete successfully.

译文:

Windows版本的Redis分配了一个内存映射堆,用于与用于持久性操作的分叉进程共享。为了共享这些内存,Windows从系统分页文件中分配了与Redis堆大小相等的部分。此时,系统分页文件中没有足够的连续可用空间来执行此操作(Windows错误0x5AF)。为了解决这个问题,您可以增加系统分页文件的大小,或者使用—maxheap标志减少Redis堆的大小。有时,重新启动将对系统分页文件进行充分的碎片整理,以使此操作能够成功完成。

解决方案:

因为系统分配内存不足引起的,可以通过添加启动参数解决:

redis-server.exe  redis.windows.conf  --maxheap 1gb

maxheap参数可以带单位也可以不带单位,不带单位默认为字节。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

以梦为馬Douglas

您的鼓励是对我最大的支持

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值