Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running Redis on Windows as service

I have followed all the suggestions I can find.
I am running the current version on redis on windows 2008 I can run fin from command line I can install the service but it doesnt run

I do... redis-server --service-install redis.windows.conf and get "redis successfully installed as a service"

Then I try to start the service doing... redis-server --service-start redis.windows.conf --loglevel verbose and get Redis service failed to start

I have made sure I have the .net framework 4.5.2 installed, I have tried with the firewall off and have played with security on the folder.

Anyone have any ideas?

(Merry Christmas all)

like image 387
Jeff Avatar asked Dec 24 '14 16:12

Jeff


People also ask

Can Redis work on Windows?

You can install Redis cache on Windows 10 using Windows Subsystem for Linux(a.k.a WSL2). WSL2 is a compatibility layer for running Linux binary executables natively on Windows 10 and Windows Server 2019.

How do I run a Redis server?

To start Redis client, open the terminal and type the command redis-cli. This will connect to your local server and now you can run any command. In the above example, we connect to Redis server running on the local machine and execute a command PING, that checks whether the server is running or not.

Do you need a server for Redis?

You're not required to host Redis on a separate server at all. In fact, it's not uncommon for application servers to run an in-memory store like Redis or Memcached on the same server for simple caching tasks.


1 Answers

Start redis server from the command line instead of as a service and it will display a more useful error message. If you are just using the default configuration it is most likely a problem with the maxmemory/maxheap configuration.

C:\redis>redis-server.exe redis.windows.conf
[1576] 04 Feb 10:32:54.172 #
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.
like image 158
Neil Avatar answered Oct 07 '22 17:10

Neil