u/afrk

Redis Cache limits
▲ 2 r/nextjs

Redis Cache limits

I am using Dokploy and tried to set some limits for redis.

https://preview.redd.it/pcy9abba4otg1.png?width=1539&format=png&auto=webp&s=43e4bed716037e924bdf9946effc49558c9a13b1

Here is what I have done.

from terminal I set:

CONFIG SET maxmemory 2gb
CONFIG Set maxmemory-policy allkeys-lru

Works great until redis is restarted, then it reset to no limits or policy

Someone suggested I use the Advanced settings in Dokploy however, that doens't seem to work either

There is the screen and I also have tried few other variations

I have tried the Advanced settings Command with Command "resdis-server" and argumanets

  1. redis-server --maxmemory 4gb
  2. redis-server --maxmemory-policy allkeys-lfu

With variations of arguments like

  1. --maxmemory
  2. 4g
  3. --maxmemory-policy
  4. allkeys-lfu

and

  1. --maxmemory 4gb
  2. --maxmemory-policy allkeys-lfu

every reload / stop and start resets it

I joined the Dokploy discord server there doesn't seem to be any help either.

How to do I set the limit and policy and make stay set even when restarted

I tried CONFIG rewrite but it say there is file to rewrite

reddit.com
u/afrk — 7 hours ago