3

I'm trying to run Redis in Windows Server 2008 https://msopentech.com/opentech-projects/redis/

I have installed it in several machines and all of them work ok. I've also tried using many logins: an administrator account, Local System, Network Service and none of them work.

The exact message Im getting is:

The Redis service on Local Computer started and then stopped.
Some services stop automatically if they are not in use by other services or programs.

I've also tried to start the service from the command line but all I get is:

[3472] 27 Jul 17:51:45.375 # Redis service failed to start.

There are no logs in the EventViewer.

Cœur
  • 37,241
  • 25
  • 195
  • 267
davibq
  • 1,089
  • 11
  • 31
  • What is the exact command line for the service and also how much disk space is there on the drive where redis executables are? – Philip P. Jul 28 '15 at 08:19
  • Im trying to start it using: redis-server --service-start. And it has like 20GB – davibq Jul 28 '15 at 15:48
  • Could be anything of course, but it may be failing because there isn't enough disk space. Those machines where it works, do they have much more disk space? Could you try to install/run from disk with more space? – Philip P. Jul 28 '15 at 20:12
  • Thanks a lot Komrade. I don't have enough disk space. You definitely point me in the right direction. And this post also helped me a lot http://stackoverflow.com/questions/28714957/redis-server-cant-run-more-than-1024m-maxheap – davibq Jul 30 '15 at 17:23
  • I am using windows, I had the same issue. After install I did a system restart and redis started automatically and all went fine for me. – Abilash Arjunan Jan 21 '20 at 03:25

1 Answers1

7

Redis wasn't starting due to storage problems as Komrade P pointed in the comments. I only had 16GB available in the HD and 8GB of memory. According to the Redis, with 8GB of memory, you will need 24GB of free space in disk.

I changed the values of maxheap, heapdir and maxmemory to make it work. Basically my problem is explained in the configuration file:

# *** There must be disk space available for this file in order for Redis 
# to launch. *** The default configuration places this file in the local 
# appdata directory. If you wish to move this file to another local disk,
# use the heapdir flag as described below.

# 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. The
# default page file sizing of Windows will allow for this without having 
# to reconfigure the system. Larger heap sizes are possible, but the maximum
# page file size will have to be increased accordingly.
davibq
  • 1,089
  • 11
  • 31
  • For me I simply changed the heapdir in the config file to `heapdir heap` and created a directory called `heap` under the folder redis was unzipped to. – TugboatCaptain Oct 20 '15 at 06:24
  • I don't find `maxheap` in config file. Is there any param to set startup required ram and then consume as and when required? – bjan Aug 28 '16 at 13:16
  • Fixed this issue by creating a new directory in a drive (with enough free space) other than the redis installation drive and mentioning the same in heapdir and starting redis again with the command - `redis-server.exe redis.windows.conf` – Sandeepan Nath Mar 26 '18 at 14:47