在fork()的運營總頁面文件承諾將最大程度的發揮左右:
(size of physical memory) + (2 * size of maxheap)
例如,對於物理內存8GB的機器上,最大頁面文件提交與默認maxheap大小將爲(8)+(2 * 8)GB或24GB。
如果你不給任何提示,Redis的,你得到類似如下的錯誤:
The Windows version of Redis allocates a large memory mapped file for sharing
the heap with the forked process used in persistence operations. This file
will be created in the current working directory or the directory specified by
the ‘heapdir’ directive in the .conf file. Windows is reporting that there is
insufficient disk space available for this file (Windows error 0x70).
You may fix this problem by either reducing the size of the Redis heap with
the –maxheap flag, or by moving the heap file to a local drive with sufficient
space.
Please see the documentation included with the binary distributions for more
details on the –maxheap and –heapdir flags.
Redis can not continue. Exiting.
爲了繞過這個限制,開始Redis的時候指定-maxheap標誌,使用值是有關您的機器:
redis-server –-maxheap 1gb
鏈接:Installing Redis Cache Locally in a Development Environment
非常感謝很多人在百萬答案中的一個,我到處尋找這個你做了我的一天:) :) –
非常感謝:-) – Cristiana214
不要複製粘貼運行字符串。首先有錯誤' - '。使用這個:'redis-server --maxheap 1gb' – Alexmelyon