# Redis fatal config file error

**URL:** <https://help.nextcloud.com/t/redis-fatal-config-file-error/51026>\
**Category:** 📦 Appliances (Docker, Snappy, VM, NCP, AIO)\
**Tags:** docker, redis, ncp\
**Created:** [April 5, 2019, 5:57pm UTC](https://help.nextcloud.com/t/redis-fatal-config-file-error/51026 "2019-04-05T17:57:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jomac](https://help.nextcloud.com/letter_avatar/jomac/32/5_5575768a8748004e209b776fc1b2916d.png) [@jomac](https://help.nextcloud.com/u/jomac)\
**Post date:** [April 5, 2019, 5:57pm UTC](https://help.nextcloud.com/t/redis-fatal-config-file-error/51026/1 "2019-04-05T17:57:21Z")

</div>

After updating to the newest nextcloudpi-armhf docker image for the raspberry pi (released around April 16), the container fails to start the nextcloudpi service. The error I see when starting the container is:

Starting redis-server:  
\*\*\* FATAL CONFIG FILE ERROR \*\*\*  
Reading the configuration file, at line 1053  
'\>\>\> ‘maxmemory’  
Bad directive or wrong number of arguments  
failed  
Init done

I opened a shell into the container (which was running, just not the nextcloud service from what I could tell). I checked the redis.conf file and did notice that the last line was line 1053 and contained only the word “maxmemory”. It seems a little out of place in a conf file, but I know little to nothing about redis.

---

<div class="post-metadata">

**Author:** ![nachoparker](https://help.nextcloud.com/user_avatar/help.nextcloud.com/nachoparker/32/2975_2.png) [@nachoparker](https://help.nextcloud.com/u/nachoparker)\
**Post date:** [April 6, 2019, 5:23am UTC](https://help.nextcloud.com/t/redis-fatal-config-file-error/51026/2 "2019-04-06T05:23:18Z")

</div>

updating from what version?

---

<div class="post-metadata">

**Author:** ![jomac](https://help.nextcloud.com/letter_avatar/jomac/32/5_5575768a8748004e209b776fc1b2916d.png) [@jomac](https://help.nextcloud.com/u/jomac)\
**Post date:** [April 6, 2019, 5:38am UTC](https://help.nextcloud.com/t/redis-fatal-config-file-error/51026/3 "2019-04-06T05:38:11Z")

</div>

Sorry, I’m not sure. I created the container in November and it’s just ran with no problems since then. If I remember correctly, there was an nc-autoupdate option that I had enabled.

---

<div class="post-metadata">

**Author:** ![j-ed](https://help.nextcloud.com/user_avatar/help.nextcloud.com/j-ed/32/7281_2.png) [@j-ed](https://help.nextcloud.com/u/j-ed)\
**Post date:** [April 6, 2019, 12:51pm UTC](https://help.nextcloud.com/t/redis-fatal-config-file-error/51026/4 "2019-04-06T12:51:34Z")

</div>

In this case it would be worse to check the redis.conf file to find out how the configuration line looks like and then search the manual of the software you want to configure for the right syntax: [https://redis.io/topics/lru-cache](https://redis.io/topics/lru-cache)

I’ve e.g. set the parameter as follows on my server: `maxmemory 256Mb`

---

<div class="post-metadata">

**Author:** ![jomac](https://help.nextcloud.com/letter_avatar/jomac/32/5_5575768a8748004e209b776fc1b2916d.png) [@jomac](https://help.nextcloud.com/u/jomac)\
**Post date:** [April 6, 2019, 9:22pm UTC](https://help.nextcloud.com/t/redis-fatal-config-file-error/51026/5 "2019-04-06T21:22:04Z")

</div>

I’ve corrected the redis.conf file from within the container with docker exec. The only way I know of restarting the service is to rebuild the container from the image or do a docker restart, which undoes my changes to the config file. Being as nobody else seems to be having this problem, maybe I should just start completely fresh and look into how to import the old db files.

---

<div class="post-metadata">

**Author:** ![nachoparker](https://help.nextcloud.com/user_avatar/help.nextcloud.com/nachoparker/32/2975_2.png) [@nachoparker](https://help.nextcloud.com/u/nachoparker)\
**Post date:** [April 7, 2019, 4:03am UTC](https://help.nextcloud.com/t/redis-fatal-config-file-error/51026/6 "2019-04-07T04:03:05Z")

</div>

do `service redis-server restart` after fixing the cfg file, then NC should work again

other option: do a backup (actually you dont need redis for that), start from scratch, restore it

other option: remove the container, pull the latest, run it with the old volume. I think that should work too

---

<div class="post-metadata">

**Author:** ![jomac](https://help.nextcloud.com/letter_avatar/jomac/32/5_5575768a8748004e209b776fc1b2916d.png) [@jomac](https://help.nextcloud.com/u/jomac)\
**Post date:** [April 7, 2019, 9:25am UTC](https://help.nextcloud.com/t/redis-fatal-config-file-error/51026/7 "2019-04-07T09:25:42Z")

</div>

> [@nachoparker](#):
>
> other option: do a backup (actually you dont need redis for that), start from scratch, restore it

That worked. Thank you!

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 4, 2024, 9:41am UTC](https://help.nextcloud.com/t/redis-fatal-config-file-error/51026/8 "2024-12-04T09:41:07Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 11, 2024, 2:45pm UTC](https://help.nextcloud.com/t/redis-fatal-config-file-error/51026/9 "2024-12-11T14:45:25Z")

</div>


