You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2025/08/25 23:24:37 UTC

(superset) 01/01: fix(docker): Configure Gunicorn for DuckDB thread safety in light compose

This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch demo
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 884a2979343e87db299f89839f8fe8ea3f70cb4a
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Mon Aug 25 16:24:09 2025 -0700

    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 <no...@anthropic.com>
---
 docker-compose-light.yml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/docker-compose-light.yml b/docker-compose-light.yml
index ad10a93ef7..5d665b9988 100644
--- a/docker-compose-light.yml
+++ b/docker-compose-light.yml
@@ -118,6 +118,12 @@ services:
       POSTGRES_DB: superset_light
       SUPERSET__SQLALCHEMY_EXAMPLES_URI: "duckdb:////app/data/examples.duckdb"
       SUPERSET_CONFIG_PATH: /app/docker/pythonpath_dev/superset_config_docker_light.py
+      # DuckDB thread-safety configuration: DuckDB is not fully thread-safe in all contexts,
+      # so we use multiple sync workers (8) with single threading (1 thread per worker)
+      # instead of the default gthread worker class to avoid database locking issues
+      SERVER_WORKER_AMOUNT: 8
+      SERVER_THREADS_AMOUNT: 1
+      SERVER_WORKER_CLASS: sync
 
   superset-init-light:
     build: