title: how to tune celery settings so Redis dosent use as much memory? CELERY_TASK_RESULT_EXPIRES?
body: <p>kinda a Celery noob here but, I think I have a configuration issue where Celery is putting too much stuff in Redis</p>
  
  <p>my goal is to attempt to reduce or optimize the amount of memory Redis is using, if I can</p>
  
  <p>i have a pretty large Django production thing, where Celery jobs are run "a lot".  In my settings.py I have </p>
  
  <pre><code>BROKER_BACKEND = "redis"
  </code></pre>
  
  <p>From a <code>top -p13907</code> Redis is using a ton of memory (on the box it's only used by Celery):</p>
  
  <pre><code>  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
  13907 redis     20   0 10.5g 3.3g  532 S    0 42.8 109:38.94 redis-server  
  </code></pre>
  
  <p>I found this <a href="http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-result_expires" rel="nofollow noreferrer">CELERY_TASK_RESULT_EXPIRES</a> setting which looks like something I should add to my settings file.</p>
  
  <p>By default, from the documentation it looks like it's set to 1 day (86400 seconds)</p>
  
  <p>Is this what I wanna change?  Or is there more settings I should look into?  Another thing I'm unsure about is if I add it, how should I go about deciding whats a "safe" number of seconds to set it to?</p>