Redis启动失败---内存不足

今天在配置SpringCloudGateway网关的时候,需要用到redis当限流的依赖。然后在window上启动

redis-server.exe redis.windows.conf

然后报错如下:

The Windows version of Redis allocates a memory mapped heap for sharing with the forked process used for persistence operations. 

C:\study\Redis\Redis-2.8_1>redis-server.exe redis.windows.conf
[23452] 26 Aug 16:49:33.776 #
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.

Please see the documentation included with the binary distributions for more
details on the --maxheap flag.

Redis can not continue. Exiting.

C: \ \复述\研究复述,- 2.8 - _1> redis-server.exe redis.windows.conf

[23452] 8月26日16:49:33.776 #

Windows版本的Redis会分配一个内存映射堆用于共享

用于持久化操作的分叉进程。为了分享这一切

内存,Windows从系统分页文件中分配等于

Redis堆的大小。此时没有足够的连续空闲空间

系统分页文件中用于此操作的可用空间(Windows错误

0 x5af)。要解决这个问题,您可以增加系统的大小

或者使用——maxheap标志减小Redis堆的大小。

有时,重新启动将充分整理系统分页文件的碎片

此操作要成功完成。

 

更多信息,请参阅二进制发行版附带的文档

关于——maxheap标志的详细信息。

 

Redis不能继续。退出。

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

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

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

 

posted @ 2021-08-26 17:17  _kerry  阅读(424)  评论(0编辑  收藏  举报