garncarz / nogamespy-vietcong

Vietcong 1 multiplayer game support
https://vietcong1.eu
GNU Affero General Public License v3.0
18 stars 2 forks source link

Celery taking over Redis #26

Closed garncarz closed 4 years ago

garncarz commented 4 years ago

Celery results are kept in Redis, number of keys still increasing. It seems some result-expires setting needs to be tweaked.

Redis key counts (Total by db)

garncarz commented 4 years ago

The zero point marks the introduction of 8f9f496. Unfortunately, it seems it has no effect on number of Redis keys. Is it setting Redis expiration correctly, or is it just some setting for a Celery cleaner which is supposed to run everyday at 4 AM?

Redis keys

garncarz commented 4 years ago

Changing name of the variable in settings from RESULT_EXPIRES to CELERY_RESULT_EXPIRES (e8ee766e83f31856211d536f575e6e65214307f6) also hasn't brought any change.

image

garncarz commented 4 years ago

Haha, so programatically setting it (4139bbd1b08062e6297a6a9d2d7bc679952cac2c) like app.conf.result_expires = settings.CELERY_RESULT_EXPIRES works!

image

Now with 10 minutes TTL for Celery results, the number of Redis keys holds at ~470.

garncarz commented 4 years ago

The Redis container now takes 80-85 MB of RAM, it used to consume more than 110 MB of RAM. I hoped it could be less by now, but ok.