{"record":{"id":"85a537fbc0c16023","repo":"apache/superset","slug":"a-timeout-occurred-while-executing-the-query","errorCode":null,"errorMessage":"A timeout occurred while executing the query.","messagePattern":"A timeout occurred while executing the query\\.","errorType":"exception","errorClass":"AlertQueryTimeout","httpStatus":408,"severity":"error","filePath":"superset/commands/report/alert.py","lineNumber":261,"sourceCode":"                        sql=rendered_sql,\n                        force_dataset_match=True,\n                    )\n                except SupersetSecurityException as ex:\n                    raise AlertQueryError(\n                        message=_(\"Alert query failed the authorization check\")\n                    ) from ex\n                start = default_timer()\n                df = self._report_schedule.database.get_df(sql=limited_rendered_sql)\n                stop = default_timer()\n                logger.info(\n                    \"Query for %s took %.2f ms\",\n                    self._execution_id,\n                    (stop - start) * 1000.0,\n                )\n                return df\n        except SoftTimeLimitExceeded as ex:\n            logger.warning(\"A timeout occurred while executing the alert query: %s\", ex)\n            raise AlertQueryTimeout() from ex\n        except ReportScheduleExecutorNotFoundError:\n            # A missing executor user is a configuration problem, not a transient\n            # query error; surface the typed error rather than masking it.\n            raise\n        except AlertQueryError:\n            # Re-raise the typed validation/authorization errors as-is instead\n            # of masking them behind the generic error below.\n            raise\n        except Exception as ex:\n            logger.warning(\"An error occurred when running alert query\")\n            # The exception message here can reveal to much information to malicious\n            # users, so we raise a generic message.\n            raise AlertQueryError(\n                message=_(\"An error occurred when running alert query\")\n            ) from ex\n\n    def validate(self) -> None:\n        \"\"\"","sourceCodeStart":243,"sourceCodeEnd":279,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset/commands/report/alert.py#L243-L279","documentation":"Error \"A timeout occurred while executing the query.\" thrown in apache/superset.","triggerScenarios":"The alert query exceeds the configured execution timeout.","commonSituations":"Running an alert query that exceeds the configured SQL Lab async timeout.","solutions":["Optimize the alert query or increase the alert/query timeout configuration.","Retry when the database is under lighter load."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}