jj9987 Posted February 18, 2018 Share Posted February 18, 2018 (edited) Application: Redis @ https://redis.io/ DockerHub: https://hub.docker.com/_/redis/ GitHub: https://github.com/juusujanar/unraid-templates/blob/master/Redis.xml This template uses the official Redis Docker image to quickly set up a Redis cache instance according to your configuration. If you have any issues/questions/suggestions regarding this Docker or the template, feel free to contact here. Edited February 19, 2018 by jj9987 Quote Link to comment
CorneliousJD Posted October 6, 2020 Share Posted October 6, 2020 (edited) Well, Redis seems to be working but there's no config file mapped to nothing we can edit. Upon opening the container I'm getting a number of warnings. Not an issue most likely for a home server setup, but would like to work to fix these if possible? 1:C 05 Oct 2020 23:47:34.407 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 1:C 05 Oct 2020 23:47:34.407 # Redis version=6.0.8, bits=64, commit=00000000, modified=0, pid=1, just started 1:C 05 Oct 2020 23:47:34.407 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf 1:M 05 Oct 2020 23:47:34.408 * Running mode=standalone, port=6379. 1:M 05 Oct 2020 23:47:34.408 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. 1:M 05 Oct 2020 23:47:34.408 # Server initialized 1:M 05 Oct 2020 23:47:34.408 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect. 1:M 05 Oct 2020 23:47:34.408 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo madvise > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled (set to 'madvise' or 'never'). Edited October 6, 2020 by CorneliousJD 1 Quote Link to comment
Tetricz Posted October 27, 2020 Share Posted October 27, 2020 On 10/5/2020 at 11:14 PM, CorneliousJD said: 1:C 05 Oct 2020 23:47:34.407 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 1:C 05 Oct 2020 23:47:34.407 # Redis version=6.0.8, bits=64, commit=00000000, modified=0, pid=1, just started 1:C 05 Oct 2020 23:47:34.407 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf 1:M 05 Oct 2020 23:47:34.408 * Running mode=standalone, port=6379. 1:M 05 Oct 2020 23:47:34.408 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. 1:M 05 Oct 2020 23:47:34.408 # Server initialized 1:M 05 Oct 2020 23:47:34.408 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect. 1:M 05 Oct 2020 23:47:34.408 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo madvise > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled (set to 'madvise' or 'never'). I happen to have these same errors popping up. Did you happen to resolve them and/or have they caused any issues? Quote Link to comment
CorneliousJD Posted October 27, 2020 Share Posted October 27, 2020 16 hours ago, Tetricz said: I happen to have these same errors popping up. Did you happen to resolve them and/or have they caused any issues? I did not, I've just been letting it ride as-is for now. Using it as file locking/caching for nextcloud. Quote Link to comment
Banuseka Posted January 23, 2021 Share Posted January 23, 2021 nextcloud me now tells that ist would need a pwd to access redis but i havn‘t set one in nextcloud or redis itself. how can i set a pwd in the redis container? best, Banu Quote Link to comment
BlueRyuu Posted February 18, 2021 Share Posted February 18, 2021 On 1/23/2021 at 4:22 PM, Banuseka said: nextcloud me now tells that ist would need a pwd to access redis but i havn‘t set one in nextcloud or redis itself. how can i set a pwd in the redis container? best, Banu Add this to Post Arguments in the template: Quote redis-server --requirepass password 1 4 Quote Link to comment
Banuseka Posted February 20, 2021 Share Posted February 20, 2021 Thx!!!!! On 2/18/2021 at 7:41 PM, BlueRyuu said: Add this to Post Arguments in the template: Thx!!!!! Quote Link to comment
CorneliousJD Posted March 19, 2021 Share Posted March 19, 2021 Is there an easy way to setup persistent storage to appdata for Redis? I need to have something in it persist across reboots if possible. thanks! Quote Link to comment
GuilhermeFluis Posted May 11, 2021 Share Posted May 11, 2021 Somebody here was able to use this container with Linuxserver.io Nextcloud? I tried the environment variables on the Nextcloud container but it basically ignored, I tried editing the config.php file but this made the container not start... If someone could help me I would be very glad Quote Link to comment
Boyturtle Posted January 5, 2022 Share Posted January 5, 2022 On 5/11/2021 at 3:48 PM, GuilhermeFluis said: Somebody here was able to use this container with Linuxserver.io Nextcloud? I tried the environment variables on the Nextcloud container but it basically ignored, I tried editing the config.php file but this made the container not start... If someone could help me I would be very glad Did you get this to work? If so, can you share please? Quote Link to comment
onkelblubb Posted January 15, 2022 Share Posted January 15, 2022 (edited) On 1/5/2022 at 11:53 AM, Boyturtle said: Did you get this to work? If so, can you share please? Redis volume path "/data" <-> "/mnt/user/appdata/redis/data" thats works for me: (my Nextcloud config.php) 'memcache.local' => '\\OC\\Memcache\\APCu', 'memcache.distributed' => '\\OC\\Memcache\\Redis', 'memcache.locking' => '\\OC\\\Memcache\\Redis', 'redis' => [ 'host' => 'redis-host.example.com', 'port' => 6379, ], Br Edited January 15, 2022 by onkelblubb Quote Link to comment
jademonkee Posted February 21, 2022 Share Posted February 21, 2022 (edited) Hi all, I have installed Redis to try and improve the performance of the gallery in NextCloud. I have set it up as per a combination of the official documentation, and this guide written for the LSIO Unraid NextCloud Docker image: https://skylar.tech/reduce-nextcloud-mysql-usage-using-redis-for-cache/ I notice above that @onkelblubbhas mapped a directory for "/data" but I didn't add that to the Docker setup. There is no Redis folder in my appdata dir. My NextCloud config file looks like: $CONFIG = array ( 'memcache.local' => '\\OC\\Memcache\\APCu', 'memcache.distributed' => '\\OC\\Memcache\\Redis', 'memcache.locking' => '\\OC\\Memcache\\Redis', 'redis' => array ( 'host' => '192.168.200.40', 'port' => 6379, ), I note that the official NextCloud documentation has the formatting slightly different (note the single slashes rather than double, and the lack of 'array' in the Redis definition): 'memcache.local' => '\OC\Memcache\APCu', 'memcache.distributed' => '\OC\Memcache\Redis', 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => [ 'host' => 'redis-host.example.com', 'port' => 6379, ], Any idea if that's problematic? I also have no idea if it's working or not? The Redis log is just absolutely filled with: [truncated] ... 1:M 21 Feb 2022 13:43:31.044 * 1 changes in 3600 seconds. Saving... 1:M 21 Feb 2022 13:43:31.044 * Background saving started by pid 179 179:C 21 Feb 2022 13:43:31.050 * DB saved on disk 179:C 21 Feb 2022 13:43:31.051 * RDB: 0 MB of memory used by copy-on-write 1:M 21 Feb 2022 13:43:31.145 * Background saving terminated with success 1:M 21 Feb 2022 13:55:38.286 * 100 changes in 300 seconds. Saving... 1:M 21 Feb 2022 13:55:38.287 * Background saving started by pid 180 180:C 21 Feb 2022 13:55:38.294 * DB saved on disk 180:C 21 Feb 2022 13:55:38.295 * RDB: 0 MB of memory used by copy-on-write 1:M 21 Feb 2022 13:55:38.387 * Background saving terminated with success 1:M 21 Feb 2022 14:00:39.004 * 100 changes in 300 seconds. Saving... 1:M 21 Feb 2022 14:00:39.004 * Background saving started by pid 181 181:C 21 Feb 2022 14:00:39.011 * DB saved on disk 181:C 21 Feb 2022 14:00:39.011 * RDB: 0 MB of memory used by copy-on-write 1:M 21 Feb 2022 14:00:39.105 * Background saving terminated with success 1:M 21 Feb 2022 14:20:19.561 * 100 changes in 300 seconds. Saving... 1:M 21 Feb 2022 14:20:19.561 * Background saving started by pid 182 182:C 21 Feb 2022 14:20:19.569 * DB saved on disk 182:C 21 Feb 2022 14:20:19.570 * RDB: 0 MB of memory used by copy-on-write 1:M 21 Feb 2022 14:20:19.662 * Background saving terminated with success 1:M 21 Feb 2022 14:44:32.005 * 100 changes in 300 seconds. Saving... 1:M 21 Feb 2022 14:44:32.005 * Background saving started by pid 183 183:C 21 Feb 2022 14:44:32.015 * DB saved on disk 183:C 21 Feb 2022 14:44:32.015 * RDB: 0 MB of memory used by copy-on-write 1:M 21 Feb 2022 14:44:32.106 * Background saving terminated with success 1:M 21 Feb 2022 14:49:33.079 * 100 changes in 300 seconds. Saving... 1:M 21 Feb 2022 14:49:33.079 * Background saving started by pid 184 184:C 21 Feb 2022 14:49:33.089 * DB saved on disk 184:C 21 Feb 2022 14:49:33.089 * RDB: 0 MB of memory used by copy-on-write 1:M 21 Feb 2022 14:49:33.180 * Background saving terminated with success The reason I installed it was to try and speed up the NextCloud gallery on Android, so that I can browse a shared photo folder. It was previously unusably slow. So I installed Redis as well as the Preview Generator app and pre-cached the images. So the gallery is now working faster (though not as fast as I'd like), but I have no idea if it's just because of the pre-generated thumbnails, or if Redis is also playing a role. As far as usage goes on Redis, it's using about 10MB RAM and less than 1% CPU, even when I'm scrolling through the image directory on the Android app. To me, that doesn't seem like it's doing much. There are no errors in the NextCloud log. Your insight and help is appreciated! EDIT: I just thought I'd try mapping an appdata dir, and the Redis logs showed: 1:C 21 Feb 2022 15:14:44.856 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 1:C 21 Feb 2022 15:14:44.856 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=1, just started 1:C 21 Feb 2022 15:14:44.856 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf 1:M 21 Feb 2022 15:14:44.857 * monotonic clock: POSIX clock_gettime 1:M 21 Feb 2022 15:14:44.858 * Running mode=standalone, port=6379. 1:M 21 Feb 2022 15:14:44.858 # Server initialized 1:M 21 Feb 2022 15:14:44.858 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect. 1:M 21 Feb 2022 15:14:44.858 * Ready to accept connections So I removed the path mapping, and I have the same message in the logs. I have no idea if it was there when I first started Redis, as the logs are filled with the messages above. I decided that I might as well add the mapping back, so have done so. The appdata dir that was created by the mapping is empty. Any tips on what could be in the config file for a Redis Docker/Unraid setup? EDIT: the dir now has a "dump.rdb" in it, but nothing else. As I browse the shares in NextCloud, the log fills up with the messages like above: 1:C 21 Feb 2022 15:21:06.136 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 1:C 21 Feb 2022 15:21:06.136 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=1, just started 1:C 21 Feb 2022 15:21:06.136 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf 1:M 21 Feb 2022 15:21:06.137 * monotonic clock: POSIX clock_gettime 1:M 21 Feb 2022 15:21:06.137 * Running mode=standalone, port=6379. 1:M 21 Feb 2022 15:21:06.137 # Server initialized 1:M 21 Feb 2022 15:21:06.137 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect. 1:M 21 Feb 2022 15:21:06.138 * Loading RDB produced by version 6.2.6 1:M 21 Feb 2022 15:21:06.138 * RDB age 382 seconds 1:M 21 Feb 2022 15:21:06.138 * RDB memory usage when created 0.77 Mb 1:M 21 Feb 2022 15:21:06.138 # Done loading RDB, keys loaded: 1, keys expired: 2. 1:M 21 Feb 2022 15:21:06.138 * DB loaded from disk: 0.000 seconds 1:M 21 Feb 2022 15:21:06.138 * Ready to accept connections 1:M 21 Feb 2022 15:28:20.667 * 100 changes in 300 seconds. Saving... 1:M 21 Feb 2022 15:28:20.667 * Background saving started by pid 19 19:C 21 Feb 2022 15:28:20.671 * DB saved on disk 19:C 21 Feb 2022 15:28:20.672 * RDB: 0 MB of memory used by copy-on-write 1:M 21 Feb 2022 15:28:20.768 * Background saving terminated with success So are the logs normal? Do I need to setup a config file for Redis? Is Redis working properly (as the logs are reacting to me browsing photos, I'm guessing it is?)? Edited February 21, 2022 by jademonkee Added info on data path mapping Quote Link to comment
jxjelly Posted May 20, 2022 Share Posted May 20, 2022 On 2/18/2021 at 1:41 PM, BlueRyuu said: Add this to Post Arguments in the template: I don't know why but upgrading my server to 6.10 required adding this to prevent it from crashing on start. When it was working fine before without. Quote Link to comment
Abigel Posted July 6, 2022 Share Posted July 6, 2022 Hi, is it possible to use redis for multiple docker container? Like for nextcloud, overleaf, authelia etc. So that all Containers are connecting to the same redi container and each with the same login, nothing diffrent, all on the same url and same password. Or will it occur problems? Quote Link to comment
TDA Posted September 7, 2022 Share Posted September 7, 2022 On 2/18/2021 at 7:41 PM, BlueRyuu said: Add this to Post Arguments in the template: Hi, I just added the app , but in the template there is no "Post Arguments" section. Quote Link to comment
Squid Posted September 7, 2022 Share Posted September 7, 2022 3 hours ago, TDA said: Hi, I just added the app , but in the template there is no "Post Arguments" section. Advanced View Quote Link to comment
CybranNakh Posted November 2, 2022 Share Posted November 2, 2022 On 7/6/2022 at 2:25 AM, Abigel said: Hi, is it possible to use redis for multiple docker container? Like for nextcloud, overleaf, authelia etc. So that all Containers are connecting to the same redi container and each with the same login, nothing diffrent, all on the same url and same password. Or will it occur problems? I also would like to know the answer to this question.... From my research of how redis is setup... my understanding is that it would be somewhat a bad idea if they are entirely unrelated databases.... but i am not an expert and I guess the only other alternative would be spinning up multiple containers Quote Link to comment
gurulee Posted December 28, 2022 Share Posted December 28, 2022 On 2/18/2021 at 1:41 PM, BlueRyuu said: Add this to Post Arguments in the template: redis-server --requirepass password Thank you! This solved my issue. I guess the variables for the other docker fork were not universal. Quote Link to comment
jademonkee Posted January 12, 2023 Share Posted January 12, 2023 I have this in my Redis logs: Quote 1:M 12 Jan 2023 10:54:44.361 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect I don't know if this is a Redis option to change or a system option to change. Any idea if it's possible (or recommended) to change? Thanks. 1 Quote Link to comment
spidobot Posted January 20, 2023 Share Posted January 20, 2023 having the same issue with redis. i created a file-link between my docker and unraid and created a redis.conf file. when starting i also recieve the message, that there is no redis.conf specified. if i try to load my custom-conf-file into the redis-server, it aborts the loading, because it is already listening to the 6379 port. it there a way to tell the docker on startup to load my custom config? if it post "redis-server /data/redis.conf" in the post-arguments redis wont start at all. does anyone have any ideas? Quote Link to comment
ingarb Posted April 17, 2023 Share Posted April 17, 2023 Hi! Is this still being maintained? I'm having a few issues. 1. The Port mapping from docker to host is mandatory, so I can't remove it. But maybe I can do that manually? 2. The "Support" link in the Unraid Docker GUI is wrong, so I had to find this thread manually. Any tips would be helpful Quote Link to comment
ingarb Posted April 17, 2023 Share Posted April 17, 2023 On 1/12/2023 at 11:58 AM, jademonkee said: I have this in my Redis logs: I don't know if this is a Redis option to change or a system option to change. Any idea if it's possible (or recommended) to change? Thanks. if this shouldn't be configured like this, then it would be nice to have this default in the docker in stead of changing it after deployment? 1 Quote Link to comment
Facsimile8512 Posted January 19 Share Posted January 19 On 1/12/2023 at 2:58 AM, jademonkee said: I have this in my Redis logs: I don't know if this is a Redis option to change or a system option to change. Any idea if it's possible (or recommended) to change? Thanks. No clue if it is an actual issue in the latest update and the warning is just a leftover, but I ran the recommended command "sysctl vm.overcommit_memory=1" in unraid's main terminal and that seems to have done something, well applied whatever this actually means. The warning though is still a warning and seems to stay around from the beginning, it doesn't actually verify if it is something that needs to be done on installed PC. I am not sure if my data is not large enough or what, but I'm not really seeing any benefits from Redis, in fact I think it made response worse, but it does get rid of that security warning in the overview. Not sure if I will keep it around since so far it just seems like unnecessary utilization of resources, even though it does seem like minor utilization. Quote Link to comment
jademonkee Posted January 19 Share Posted January 19 9 hours ago, Facsimile8512 said: No clue if it is an actual issue in the latest update and the warning is just a leftover, but I ran the recommended command "sysctl vm.overcommit_memory=1" in unraid's main terminal and that seems to have done something, well applied whatever this actually means. The warning though is still a warning and seems to stay around from the beginning, it doesn't actually verify if it is something that needs to be done on installed PC. I am not sure if my data is not large enough or what, but I'm not really seeing any benefits from Redis, in fact I think it made response worse, but it does get rid of that security warning in the overview. Not sure if I will keep it around since so far it just seems like unnecessary utilization of resources, even though it does seem like minor utilization. Yeah, I'm clueless as to if it made any difference for me, but figure that I've gone to to the trouble of setting it up and it takes up so little resources that I might as well keep it around. I initially installed it to try and get my photos to load faster in my photo app. I applied so many fixes that I have no idea what fixed it, but it's working well enough now, so I don't want to rock the boat. Quote Link to comment
cruzerkk Posted January 28 Share Posted January 28 (edited) On 9/7/2022 at 6:48 PM, Squid said: Advanced View Hi, I tried adding redis-server --requirepass myPassword to Post Arguments, but the container wouldn't start. Logs shows the following error: Reading the configuration file, at line 2 >>> 'requirepass' wrong number of arguments Can anyone please tell me what I'm doing wrong ? Edited January 28 by cruzerkk Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.