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

<!-- Answer -->
This error happens because Superset (via Flask) needs SERVER_NAME set to 
generate absolute URLs in background tasks, which is required for Global Async 
Queries (GAQ) to work. In Kubernetes/Helm, setting SERVER_NAME is risky—if it 
doesn't exactly match your external hostname (including port), Flask will 
reject requests and you'll get 404s. That's why adding SERVER_NAME often breaks 
routing in dynamic environments 
[reference](https://github.com/apache/superset/discussions/34517).

There’s no robust workaround in Superset 5.0.0 for this limitation. The only 
way to avoid the error is to set SERVER_NAME to the exact hostname your users 
and Celery workers use to access Superset (matching your ingress or load 
balancer DNS). If your ingress hostname is static, you can set SERVER_NAME to 
that value. If it’s dynamic or changes, there’s no safe way to set it—this is a 
known pain point for async queries in cloud-native setups 
[reference](https://github.com/apache/superset/discussions/33920).

Best practices: leave SERVER_NAME unset unless you have a static hostname, set 
ENABLE_PROXY_FIX = True, PREFERRED_URL_SCHEME = "https", and 
SESSION_COOKIE_SECURE = True. For some async/background tasks, setting 
WEBDRIVER_BASEURL to the actual Superset URL can help, but it doesn’t replace 
SERVER_NAME for Flask URL generation 
[reference](https://github.com/apache/superset/discussions/34382).

If you want to experiment, you could try scripting SERVER_NAME injection at 
deployment time based on your ingress DNS, but this is brittle. If you have a 
static domain, use that. If not, you may need to wait for upstream improvements 
or consider disabling GAQ until this is addressed.

Let me know if you want to discuss advanced workarounds or share more about 
your ingress setup for tailored advice.


<!-- 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/b32d15f2-a133-403d-a488-b7d5ea0c0269?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/b32d15f2-a133-403d-a488-b7d5ea0c0269?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/b32d15f2-a133-403d-a488-b7d5ea0c0269?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/b32d15f2-a133-403d-a488-b7d5ea0c0269?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/b32d15f2-a133-403d-a488-b7d5ea0c0269?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/b32d15f2-a133-403d-a488-b7d5ea0c0269?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/b32d15f2-a133-403d-a488-b7d5ea0c0269?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat
 with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
 nbsp;[![Join 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](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-13968449

----
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]

Reply via email to