GitHub user dosubot[bot] added a comment to the discussion: How to enable Global Async Queries on v5.0.0 using helm chart in GKE
<!-- Greeting --> Hi @eduardchai! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team. <!-- Answer --> To enable Global Async Queries (GAQ) in Superset v5.0.0 with the Helm chart on GKE, your Redis config and FEATURE_FLAGS are correct, but there are a few key points and common pitfalls: 1. **JWT Secret**: Don't generate `GLOBAL_ASYNC_QUERIES_JWT_SECRET` with `os.urandom()` at each startup. This breaks async query authentication after restarts. Instead, generate a 32+ byte hex string once and inject it via a Kubernetes secret or Helm value so it stays consistent across pod restarts ([source](https://github.com/apache/superset/issues/33604)). 2. **SERVER_NAME**: Setting `SERVER_NAME` in Kubernetes is risky. If it doesn't exactly match the external hostname used to access Superset (including port, if not 80/443), Flask will reject requests and you'll get 404 errors ([source](https://github.com/apache/superset/issues/33604)). In most Helm/GKE setups, you should avoid setting `SERVER_NAME` unless you have a static, known hostname that matches your ingress. If unset, Flask will still work for most in-request URL building. 3. **APPLICATION_ROOT**: Only set this if you are serving Superset under a subpath (e.g., `/analytics`). If you set it incorrectly, the AppRootMiddleware will return 404 for all requests that don't match the prefix ([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/app.py)). For root deployments, leave it as `/`. 4. **PREFERRED_URL_SCHEME**: Set this to `'https'` if your ingress or load balancer terminates SSL, so generated URLs use HTTPS ([source](https://github.com/apache/superset/discussions/31584)). 5. **ENABLE_PROXY_FIX**: Set `ENABLE_PROXY_FIX = True` in your configOverrides. This is important for correct URL and scheme handling behind Kubernetes ingress or any proxy ([source](https://github.com/apache/superset/discussions/31584)). 6. **SESSION_COOKIE_SECURE**: Set this to `True` for HTTPS deployments to ensure cookies are only sent over secure connections. 7. **GAQ Redis Backend**: Your `GLOBAL_ASYNC_QUERIES_CACHE_BACKEND` config is correct for a standalone Redis. If you use Redis Sentinel, use `CACHE_TYPE: "RedisSentinelCache"` and provide the sentinel config ([source](https://github.com/apache/superset/issues/33604)). **Troubleshooting:** - The "Unable to build URLs outside an active request without 'SERVER_NAME' configured" error usually only matters for background tasks or when generating absolute URLs outside a request. If you don't need this, you can often ignore it, or set `SERVER_NAME` only if you know the exact external hostname. - The 404 after setting `SERVER_NAME` is almost always a hostname mismatch between what Flask expects and what your ingress sends. Remove or correct `SERVER_NAME` to match your ingress DNS exactly. - If you deploy under a subpath, make sure both `APPLICATION_ROOT` and your ingress path match, and that the `X-Forwarded-Prefix` header is set by your ingress. **Example minimal configOverrides for root path:** ```python SUPERSET_WEBSERVER_TIMEOUT = 60000 FEATURE_FLAGS = { "GLOBAL_ASYNC_QUERIES": True, } GLOBAL_ASYNC_QUERIES_JWT_SECRET = "<your-persistent-hex-secret>" GLOBAL_ASYNC_QUERIES_CACHE_BACKEND = { "CACHE_TYPE": "RedisCache", "CACHE_REDIS_HOST": "superset-redis-headless", "CACHE_REDIS_PORT": 6379, "CACHE_REDIS_USER": "", "CACHE_REDIS_PASSWORD": "", "CACHE_REDIS_DB": 0, "CACHE_DEFAULT_TIMEOUT": 300 } PREFERRED_URL_SCHEME = "https" ENABLE_PROXY_FIX = True SESSION_COOKIE_SECURE = True ``` Leave out `SERVER_NAME` and `APPLICATION_ROOT` unless you have a specific need and know the exact values. If you still see issues, double-check your ingress host, DNS, and that all pods use the same config and secrets. For async queries, make sure both web and worker pods can access the same metadata DB and Redis ([source](https://github.com/apache/superset/discussions/33920)). Let me know if you need more details on any step! <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/5b98d65b-8f6b-4d4c-aa60-231d314414a5?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/5b98d65b-8f6b-4d4c-aa60-231d314414a5?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/5b98d65b-8f6b-4d4c-aa60-231d314414a5?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/5b98d65b-8f6b-4d4c-aa60-231d314414a5?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5b98d65b-8f6b-4d4c-aa60-231d314414a5?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/5b98d65b-8f6b-4d4c-aa60-231d314414a5?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5b98d65b-8f6b-4d4c-aa60-231d314414a5?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)& nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/34517) GitHub link: https://github.com/apache/superset/discussions/34517#discussioncomment-13968292 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
