Self hosted, redis cache not working correctly

  1. My goal: To get the redis cache working.

  2. Issue: Retool is not persisting anything in the redis cache.

  3. Retool version & hosting setup (Docker, K8s, cloud provider, etc.): k8s, 3.284.7

  4. Error message(s) or screenshots:
    {"args":[null],"code":"ERR","command":"SELECT","level":"error","message":"[caching] customer redis client error: ERR value is not an integer or out of range","stack":"ReplyError: ERR value is not an integer or out of range\n at AB4 (/retool_backend/bundle/main.js:102:56771)\n at FEl (/retool_backend/bundle/main.js:102:57509)"}

    {"args":[null],"code":"ERR","command":"SELECT","level":"error","message":"[caching] backend redis client error: ERR value is not an integer or out of range","stack":"ReplyError: ERR value is not an integer or out of range\n at AB4 (/retool_backend/bundle/main.js:102:56771)\n at FEl (/retool_backend/bundle/main.js:102:57509)"}

  5. What I’ve tried so far: I’ve configured the redis cache using the environment variables REDIS_HOST and REDIS_PASSWORD. I’m confident they are set correctly, because I can reach the redis host from the retool pods. I’ve also tried connecting to redis using the redis-cli, which works well, auth included. I’ve configured caching on a few queries and I reload my app to make sure caches are warm, but nothing happens. When I check redis though the cli, using KEYS *, nothing shows. And there’s of course the logs above.

Any ideas of what might be the issue?

The redis version is 8.4.0, btw.

Hi @user_mch, you may need to explicitly set REDIS_DB=0 and REDIS_PORT=6379. Let us know if that’s the issue and we can fix that for future users!

Yes! That did the trick. No errors in the log and KEYS * show results. Thank you!

1 Like