Skip to content

Add SQL Lab query limits and timeout caps - #118

Merged
szachovy merged 2 commits into
masterfrom
fix/81-sqllab-query-limits
Apr 9, 2026
Merged

Add SQL Lab query limits and timeout caps#118
szachovy merged 2 commits into
masterfrom
fix/81-sqllab-query-limits

Conversation

@szachovy

@szachovy szachovy commented Apr 8, 2026

Copy link
Copy Markdown
Owner

Set SQL_MAX_ROW=10000, DEFAULT_SQLLAB_LIMIT=1000, SQLLAB_TIMEOUT=300s, and SQLLAB_VALIDATION_TIMEOUT=60s to prevent unbounded queries from exhausting memory or blocking worker threads.

Closes #81

szachovy and others added 2 commits April 8, 2026 13:07
Set SQL_MAX_ROW=10000, DEFAULT_SQLLAB_LIMIT=1000, SQLLAB_TIMEOUT=300s,
and SQLLAB_VALIDATION_TIMEOUT=60s to prevent unbounded queries from
exhausting memory or blocking worker threads.

Closes #81

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@szachovy
szachovy merged commit 71720d4 into master Apr 9, 2026
10 of 11 checks passed
@szachovy
szachovy deleted the fix/81-sqllab-query-limits branch April 9, 2026 12:09
szachovy pushed a commit that referenced this pull request Apr 10, 2026
PR #118 explicitly set SQL_QUERY_MUTATOR = None. Superset 4.0 calls
this as a function during SQL Lab async query execution via Celery,
so setting it to None causes 'NoneType' object is not callable and
the query state returns 'failed'. It defaults to None internally when
unset, so the line is both redundant and breaking.
szachovy pushed a commit that referenced this pull request Apr 10, 2026
PR #118 set SQL_QUERY_MUTATOR = None which caused 'NoneType' object is
not callable in the Celery sql_lab worker. The previous commit removed
that line, but explicitly defining the passthrough function ensures the
Superset config module loading path cannot re-introduce a None value
regardless of import order or config overlay behavior.
szachovy pushed a commit that referenced this pull request Apr 10, 2026
The root cause was SQL_QUERY_MUTATOR = None set in superset_config.py
by PR #118. The passthrough function definition (commit 1e662c3) is the
correct and sufficient fix. The superset_celery_app.py wrapper and
entrypoint PYTHONPATH change were unnecessary complexity chasing a
symptom; revert them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AP-2: Add SQL Lab query size and timeout limits

1 participant