Skip to content

Commit 884a297

Browse files
mistercrunchclaude
andcommitted
fix(docker): Configure Gunicorn for DuckDB thread safety in light compose
DuckDB is not fully thread-safe in all contexts, causing database locking issues when used with Gunicorn's default gthread worker class. This change configures docker-compose-light.yml to use multiple sync workers (8) with single threading (1 thread per worker) instead of the default threaded configuration to prevent database conflicts. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b89b0bd commit 884a297

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docker-compose-light.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@ services:
118118
POSTGRES_DB: superset_light
119119
SUPERSET__SQLALCHEMY_EXAMPLES_URI: "duckdb:////app/data/examples.duckdb"
120120
SUPERSET_CONFIG_PATH: /app/docker/pythonpath_dev/superset_config_docker_light.py
121+
# DuckDB thread-safety configuration: DuckDB is not fully thread-safe in all contexts,
122+
# so we use multiple sync workers (8) with single threading (1 thread per worker)
123+
# instead of the default gthread worker class to avoid database locking issues
124+
SERVER_WORKER_AMOUNT: 8
125+
SERVER_THREADS_AMOUNT: 1
126+
SERVER_WORKER_CLASS: sync
121127

122128
superset-init-light:
123129
build:

0 commit comments

Comments
 (0)