Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when Open Redis server

Tags:

redis

nosql

I download Redis 2.8.19 on windows, it run properly. But after i reboot my computer, i try to open it and an error show up :

Redis Open server error

[]5880] 14 May 15:42:12.227# 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.

I cant find the heap file and dont know how to reduce the size of Redis heap. Thanks !

like image 767
Hana Avatar asked Feb 10 '23 03:02

Hana


1 Answers

During fork() operations the total page file commit will max out at around:

(size of physical memory) + (2 * size of maxheap)

For instance, on a machine with 8GB of physical RAM, the max page file commit with the default maxheap size will be (8)+(2*8) GB , or 24GB.

If you don’t give any hints to Redis, you get an error similar to the following:

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.

To get around this limitation, specify the –maxheap flag when starting Redis, using a value that is relevant to your machine:

redis-server –-maxheap 1gb

Link : Installing Redis Cache Locally in a Development Environment

like image 62
Hana Avatar answered Feb 15 '23 21:02

Hana