gpt4 book ai didi

windows - 在 Windows 上启动 Redis 失败

转载 作者:IT王子 更新时间:2023-10-29 06:06:26 24 4
gpt4 key购买 nike

我正在尝试在 Windows 10 上启动 Redis。当我运行 redis-server.exe 时,我收到以下消息:

C:\Program Files\Redis>redis-server.exe
[4680] 01 Jun 19:57:30.844 #
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.

我已经尝试添加一个 --maxheap 值,但这会导致应用程序崩溃并打印出故障转储:

C:\Program Files\Redis>redis-server.exe  --maxheap 150
[6728] 01 Jun 19:57:41.063 #

=== REDIS BUG REPORT START: Cut & paste starting from here ===
[6728] 01 Jun 19:57:41.063 # Redis version: 2.8.2400
[6728] 01 Jun 19:57:41.063 # Out Of Memory allocating 16 bytes.
[6728] 01 Jun 19:57:41.094 # --- ABORT
[6728] 01 Jun 19:57:41.094 # --- STACK TRACE
redis-server.exe!LogStackTrace(c:\release\redis\src\win32_interop\win32_stacktrace.cpp:95)(0x00000016, 0x00001C1D, 0x00000000, 0x00000001)
redis-server.exe!AbortHandler(c:\release\redis\src\win32_interop\win32_stacktrace.cpp:207)(0x00000001, 0xA222916F, 0x00000000, 0xDA31C9A7)
redis-server.exe!raise(f:\dd\vctools\crt\crtw32\misc\winsig.c:587)(0x00000001, 0x00000000, 0x00000010, 0x00000018)
redis-server.exe!abort(f:\dd\vctools\crt\crtw32\misc\abort.c:82)(0xFFE97BC0, 0x40141940, 0x00000010, 0x00000000)
redis-server.exe!redisOutOfMemoryHandler(c:\release\redis\src\redis.c:3404)(0x00000000, 0x4013FC28, 0x00001C1D, 0x0014FB80)
redis-server.exe!createSharedObjects(c:\release\redis\src\redis.c:1326)(0x4013BD44, 0x00000000, 0x00000001, 0x00000001)
redis-server.exe!initServer(c:\release\redis\src\redis.c:1733)(0x4013BD44, 0x4013BD44, 0x00000000, 0x4013BD44)
redis-server.exe!redis_main(c:\release\redis\src\redis.c:3504)(0x00490470, 0x00000000, 0x574F3E35, 0x00000000)
redis-server.exe!main(c:\release\redis\src\win32_interop\win32_qfork.cpp:1338)(0x00000000, 0x00000000, 0x00000000, 0x0034F000)
redis-server.exe!__tmainCRTStartup(f:\dd\vctools\crt\crtw32\startup\crt0.c:255)(0x00000000, 0x400344CC, 0x00000000, 0x00000000)
KERNEL32.DLL!BaseThreadInitThunk(f:\dd\vctools\crt\crtw32\startup\crt0.c:255)(0xD9E580E0, 0x00000000, 0x00000000, 0x00000000)
ntdll.dll!RtlUserThreadStart(f:\dd\vctools\crt\crtw32\startup\crt0.c:255)(0x00000000, 0x00000000, 0x00000000, 0x00000000)
ntdll.dll!RtlUserThreadStart(f:\dd\vctools\crt\crtw32\startup\crt0.c:255)(0x00000000, 0x00000000, 0x00000000, 0x00000000)
[6728] 01 Jun 19:57:41.172 #
=== REDIS BUG REPORT END. Make sure to include from START to END. ===

Please report this bug by following the instructions at:

http://github.com/MSOpenTech/redis/wiki/Submitting-an-Issue

Suspect RAM error? Use redis-server --test-memory to verify it.

我已经尝试使用故障转储末尾建议的剩余内存选项运行,但这只会给我带来与运行可执行文件时没有它时相同的错误:

C:\Program Files\Redis>redis-server.exe  --test-memory
[756] 01 Jun 19:58:34.376 #
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.

我有 14Gb 内存,所以我很难相信这是内存问题。

最佳答案

在谷歌搜索后找到了答案:https://gist.github.com/anthavio/38d0ba4c916ab1911a47

不要使用 --maxheap 选项(它似乎什么都不做),而是将值添加到配置中:

maxheap 1000000000

关于windows - 在 Windows 上启动 Redis 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37577837/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com