vanducng opened a new issue, #20330:
URL: https://github.com/apache/superset/issues/20330
Hi all,
Anybody experienced similar issues with SQL Lab on superset that failed to
showing up tables?
I suspect there is some mis-configuration for redis, already tried numerous
options without luck (config placed as below).
Would appreciate any advises from communities. Thanks.
### Error
```sh
2022-06-09 08:46:22,330:ERROR:superset.views.base:value is not an integer or
out of range
Traceback (most recent call last):
File "/app/superset/views/base.py", line 189, in wraps
return f(self, *args, **kwargs)
File
"/usr/local/lib/python3.8/site-packages/flask_appbuilder/security/decorators.py",
line 190, in wraps
return f(self, *args, **kwargs)
File "/app/superset/utils/log.py", line 245, in wrapper
value = f(*args, **kwargs)
File "/app/superset/views/core.py", line 1173, in tables
database.get_all_table_names_in_schema(
File "/app/superset/utils/cache.py", line 126, in wrapped_f
cache.set(cache_key, obj, timeout=kwargs.get("cache_timeout"))
File "/usr/local/lib/python3.8/site-packages/flask_caching/__init__.py",
line 267, in set
return self.cache.set(*args, **kwargs)
File
"/usr/local/lib/python3.8/site-packages/flask_caching/backends/rediscache.py",
line 163, in set
result = self._write_client.setex(
File "/usr/local/lib/python3.8/site-packages/redis/client.py", line 1822,
in setex
return self.execute_command('SETEX', name, time, value)
File "/usr/local/lib/python3.8/site-packages/redis/client.py", line 901,
in execute_command
return self.parse_response(conn, command_name, **options)
File "/usr/local/lib/python3.8/site-packages/redis/client.py", line 915,
in parse_response
response = connection.read_response()
File "/usr/local/lib/python3.8/site-packages/redis/connection.py", line
756, in read_response
raise response
redis.exceptions.ResponseError: value is not an integer or out of range
```
### Configuration
```yaml
configOverrides:
feature_flags: |
import ast
from datetime import timedelta
from cachelib.redis import RedisCache
FEATURE_FLAGS = {
"DASHBOARD_CROSS_FILTERS": True,
"ALERT_REPORTS": True,
"ENABLE_TEMPLATE_PROCESSING": True,
"ENABLE_TEMPLATE_REMOVE_FILTERS": True,
"KV_STORE": True,
"DASHBOARD_RBAC": True,
"THUMBNAILS": False,
"THUMBNAILS_SQLA_LISTENERS": False,
}
PUBLIC_ROLE_LIKE = "Gamma"
WTF_CSRF_ENABLED = False
# https://flask-caching.readthedocs.io/en/latest/
RESULTS_BACKEND = RedisCache(host='superset-redis-headless',
port=6379, db=0, key_prefix='superset_results')
CACHE_DEFAULT_TIMEOUT = int(timedelta(days=1).total_seconds())
CACHE_CONFIG = {
'CACHE_KEY_PREFIX': 'superset_',
'CACHE_TYPE': 'RedisCache',
'CACHE_DEFAULT_TIMEOUT': int(timedelta(days=1).total_seconds()),
'CACHE_REDIS_HOST': 'superset-redis-headless',
'CACHE_REDIS_DB': 1,
'CACHE_REDIS_PORT': 6379,
'CACHE_REDIS_URL': 'redis://superset-redis-headless:6379/1'
}
DATA_CACHE_CONFIG = {
**CACHE_CONFIG
}
FILTER_STATE_CACHE_CONFIG = {
**CACHE_CONFIG,
'CACHE_DEFAULT_TIMEOUT': int(timedelta(days=60).total_seconds()),
'REFRESH_TIMEOUT_ON_RETRIEVAL': True,
}
EXPLORE_FORM_DATA_CACHE_CONFIG = {
**CACHE_CONFIG,
'CACHE_DEFAULT_TIMEOUT': int(timedelta(days=7).total_seconds()),
'REFRESH_TIMEOUT_ON_RETRIEVAL': True,
}
THUMBNAIL_CACHE_CONFIG = {
**CACHE_CONFIG,
'CACHE_NO_NULL_WARNING': True,
}
celery_conf: |
from celery.schedules import crontab
class CeleryConfig(object):
broker_url = os.getenv("REDIS_URI")
imports = ("superset.sql_lab", "superset.tasks",
"superset.tasks.thumbnails", )
result_backend = os.getenv("REDIS_URI")
worker_log_level = 'DEBUG'
worker_prefetch_multiplier = 10
task_acks_late = True
task_annotations = {
'sql_lab.get_sql_results': {
'rate_limit': '100/s',
},
'email_reports.send': {
'rate_limit': '1/s',
'time_limit': 600,
'soft_time_limit': 600,
'ignore_result': True,
},
}
beat_schedule = {
'reports.scheduler': {
'task': 'reports.scheduler',
'schedule': crontab(minute='*', hour='*'),
},
'reports.prune_log': {
'task': 'reports.prune_log',
'schedule': crontab(minute=0, hour=0),
},
}
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]