GitHub user dosubot[bot] added a comment to the discussion: prolong timeout
<!-- Answer --> Yes, you can prolong the SQL request timeout in Superset by adjusting several configuration options in your superset_config.py file. The most relevant settings are: - SQLLAB_TIMEOUT: timeout for synchronous SQL Lab queries (default 30 seconds). - SQLLAB_ASYNC_TIME_LIMIT_SEC: max duration for async queries before Celery kills them (default 6 hours). - SQLLAB_QUERY_RESULT_TIMEOUT: timeout for fetching query results in SQL Lab (set to 0 for no timeout). - SUPERSET_WEBSERVER_TIMEOUT: client-side timeout for web requests (default 60 seconds). For example: ```python SQLLAB_TIMEOUT = 1800 # 30 minutes SQLLAB_ASYNC_TIME_LIMIT_SEC = 21600 # 6 hours SQLLAB_QUERY_RESULT_TIMEOUT = 0 # no timeout SUPERSET_WEBSERVER_TIMEOUT = 1800 # 30 minutes ``` You may also need to increase timeouts in your web server or proxy (like Nginx or Gunicorn) to avoid 504 errors for long-running queries. If you're using MSSQL, you can set ConnectionTimeout and CommandTimeout in your connection string as well. For long-running queries, it's recommended to enable asynchronous query execution in your database settings (Sources > Databases > Edit > Advanced settings > Enable async) to avoid frontend timeouts and improve reliability. References: - [Superset FAQ on query timeouts](https://github.com/apache/superset/blob/master/docs/docs/faq.mdx) - [Example config and async execution advice](https://github.com/apache/superset/issues/33218) - [MSSQL connection string timeout example](https://github.com/apache/superset/discussions/33957) <!-- 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/cfd78a9d-e95e-4888-b67c-433c4f272b93?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/cfd78a9d-e95e-4888-b67c-433c4f272b93?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/cfd78a9d-e95e-4888-b67c-433c4f272b93?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/cfd78a9d-e95e-4888-b67c-433c4f272b93?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/cfd78a9d-e95e-4888-b67c-433c4f272b93?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/cfd78a9d-e95e-4888-b67c-433c4f272b93?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/cfd78a9d-e95e-4888-b67c-433c4f272b93?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/36052) GitHub link: https://github.com/apache/superset/discussions/36052#discussioncomment-14920981 ---- 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]
