You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/04/21 01:08:29 UTC

[GitHub] [incubator-superset] jayhjha commented on issue #9597: Cache warm-ups never succeed

jayhjha commented on issue #9597:
URL: https://github.com/apache/incubator-superset/issues/9597#issuecomment-616889868


   @Pinimo what does your cache config look like?
   I setup redis caching with with a timeout of 5 minutes and cache warmup with the `topndashboard` strategy every 2 minutes (just to test). 
   I can see this in Celery worker logs:
   ```
   [2020-04-21 00:36:00,009: INFO/ForkPoolWorker-1] cache-warmup[e41de539-0bf7-4e70-b02b-4d2a132d8d0e]: Loading strategy
   [2020-04-21 00:36:00,010: INFO/ForkPoolWorker-1] cache-warmup[e41de539-0bf7-4e70-b02b-4d2a132d8d0e]: Loading TopNDashboardsStrategy
   [2020-04-21 00:36:00,014: INFO/ForkPoolWorker-1] cache-warmup[e41de539-0bf7-4e70-b02b-4d2a132d8d0e]: Success!
   [2020-04-21 00:36:00,043: INFO/ForkPoolWorker-1] cache-warmup[e41de539-0bf7-4e70-b02b-4d2a132d8d0e]: Fetching http://0.0.0.0:8088/superset/explore/?form_data=%7B%22slice_id%22%3A%201%7D
   [2020-04-21 01:06:00,131: INFO/ForkPoolWorker-2] cache-warmup[d2d68627-adce-4fa5-852e-522e95350a6c]: {'success': ['http://0.0.0.0:8088/superset/explore/?form_data=%7B%22slice_id%22%3A%201%7D'], 'errors': []}
   ```
   
   but in Superset logs, I only see:
   ```
   superset_1      | 2020-04-21 00:36:00,049 [DEBUG] [stats_logger] (incr) explore
   ```
   
   Needless to say, my charts are not being updated
   
   This is my config:
   ```
   CACHE_DEFAULT_TIMEOUT = 300
   CACHE_CONFIG = {
       'CACHE_TYPE': 'redis',
       'CACHE_DEFAULT_TIMEOUT': 180,
       'CACHE_KEY_PREFIX': 'superset_results',
       'CACHE_REDIS_URL': 'redis://localhost:6379/0',
   }
   
   class CeleryConfig(object):
       BROKER_URL = 'redis://localhost:6379/0'
       CELERY_IMPORTS = (
           'superset.sql_lab',
           'superset.tasks',
       )
       CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
       CELERYD_LOG_LEVEL = 'DEBUG'
       CELERYD_PREFETCH_MULTIPLIER = 10
       CELERY_ACKS_LATE = True
       CELERYBEAT_SCHEDULE = {
           'cache-warmup-hourly': {
               'task': 'cache-warmup',
               'schedule': crontab(minute='*/2', hour='*'),
               'kwargs': {
                   'strategy_name': 'top_n_dashboards',
                   'top_n': 5,
                   'since': '7 days ago',
               },
           },
       }
   
   CELERY_CONFIG = CeleryConfig
   ```
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org