今天在使用Redis的時候出現以下錯誤:
QForkMasterInit: system error caught. error code=0x000005af, message=VirtualAllocEx failed.
主要原因是磁盤吃緊。
具體解決方法是:
redis的conf文件設置參數maxheap和maxmemory。
maxmemory 120MB
maxheap 180MB
maxmemory和maxheap根據自己的電腦配置而定,通常情況下:
maxheap = 1.5 * maxmemory