title: Redis 启动报错 QForkMasterInit system error caught error code=0x000005af 解决
date: 2022-03-16 16:20:49
tags:
- Redis
categories: - 问题记录
cover: https://cover.png
feature: false
1. 问题
直接用 redis-server.exe 启动时闪退,用脚本加上配置文件启动也闪退,用命令行启动时,报错:
[23848] 16 Mar 16:10:32.565 # QForkMasterInit: system error caught. error code=0x000005af, message=VirtualAllocEx failed.: unknown error
2. 解决方法
Redis 的 conf 文件设置参数 maxheap 和 maxmemory
- maxmemory 120MB
- maxheap 180MB
maxmemory 和 maxheap 根据自己的电脑配置而定,通常情况下:maxheap = 1.5 * maxmemory