GitHub user dosubot[bot] added a comment to the discussion: Query time out in widget , not killing the query executing in database
<!-- Answer --> Superset 4.1.2 does not have a configuration to automatically kill or cancel a running database query when a UI timeout occurs. Timeout settings like `SQLLAB_TIMEOUT`, `SUPERSET_WEBSERVER_TIMEOUT`, and `SQLLAB_ASYNC_TIME_LIMIT_SEC` control how long Superset waits for queries or results, but they do not send a kill/cancel request to the database if the UI times out—queries will continue running in the database unless manually stopped by the user (for example, by clicking STOP in SQL Lab) [reference](https://github.com/apache/superset/issues/33218). Some database engines (Hive, Impala, MySQL, SingleStore) have support for explicit query cancellation, but Superset only triggers these when the user cancels the query, not on timeout [Hive](https://github.com/apache/superset/blob/master/superset/db_engine_specs/hive.py), [Impala](https://github.com/apache/superset/blob/master/superset/db_engine_specs/impala.py), [MySQL](https://github.com/apache/superset/blob/master/superset/db_engine_specs/mysql.py), [SingleStore](https://github.com/apache/superset/blob/master/superset/db_engine_specs/singlestore.py). If you need queries to be killed after a certain duration, consider enabling asynchronous query execution and setting `SQLLAB_ASYNC_TIME_LIMIT_SEC` to limit how long queries can run before being killed by Celery (in async mode), but this is not tied to UI timeouts [reference](https://github.com/apache/superset/issues/33218). There is currently no built-in way to automatically kill database queries on UI timeout in Superset 4.1.2. <!-- 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/fefca4a5-ba2e-4000-aae0-47839e805484?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/fefca4a5-ba2e-4000-aae0-47839e805484?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/fefca4a5-ba2e-4000-aae0-47839e805484?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/fefca4a5-ba2e-4000-aae0-47839e805484?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/fefca4a5-ba2e-4000-aae0-47839e805484?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/fefca4a5-ba2e-4000-aae0-47839e805484?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/fefca4a5-ba2e-4000-aae0-47839e805484?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/35522) GitHub link: https://github.com/apache/superset/discussions/35522#discussioncomment-14604396 ---- 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]
