Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

chore: increase default graph engine min workers (#35650)

kenwoodjw9dc32f2318db
diff --git a/api/.env.example b/api/.env.example
index 40fed7403cc..34be400e87d 100644
--- a/api/.env.example
+++ b/api/.env.example
@@ -557,7 +557,7 @@ MAX_VARIABLE_SIZE=204800
# GraphEngine Worker Pool Configuration
# Minimum number of workers per GraphEngine instance (default: 1)
-GRAPH_ENGINE_MIN_WORKERS=1
+GRAPH_ENGINE_MIN_WORKERS=3
# Maximum number of workers per GraphEngine instance (default: 10)
GRAPH_ENGINE_MAX_WORKERS=10
# Queue depth threshold that triggers worker scale up (default: 3)
diff --git a/api/configs/feature/__init__.py b/api/configs/feature/__init__.py
index ccb97d96ef1..a752d9d1036 100644
--- a/api/configs/feature/__init__.py
+++ b/api/configs/feature/__init__.py
@@ -761,7 +761,7 @@ class WorkflowConfig(BaseSettings):
# GraphEngine Worker Pool Configuration
GRAPH_ENGINE_MIN_WORKERS: PositiveInt = Field(
description="Minimum number of workers per GraphEngine instance",
- default=1,
+ default=3,
)
GRAPH_ENGINE_MAX_WORKERS: PositiveInt = Field(
diff --git a/api/tests/unit_tests/core/workflow/graph_engine/test_table_runner.py b/api/tests/unit_tests/core/workflow/graph_engine/test_table_runner.py
index 7d23b63049c..100b294f528 100644
--- a/api/tests/unit_tests/core/workflow/graph_engine/test_table_runner.py
+++ b/api/tests/unit_tests/core/workflow/graph_engine/test_table_runner.py
@@ -297,7 +297,7 @@ class TableTestRunner:
max_workers: int = 4,
enable_logging: bool = False,
log_level: str = "INFO",
- graph_engine_min_workers: int = 1,
+ graph_engine_min_workers: int = 3,
graph_engine_max_workers: int = 1,
graph_engine_scale_up_threshold: int = 5,
graph_engine_scale_down_idle_time: float = 30.0,
@@ -310,7 +310,7 @@ class TableTestRunner:
max_workers: Maximum number of parallel workers for test execution
enable_logging: Enable detailed logging
log_level: Logging level (DEBUG, INFO, WARNING, ERROR)
- graph_engine_min_workers: Minimum workers for GraphEngine (default: 1)
+ graph_engine_min_workers: Minimum workers for GraphEngine (default: 3)
graph_engine_max_workers: Maximum workers for GraphEngine (default: 1)
graph_engine_scale_up_threshold: Queue depth to trigger scale up
graph_engine_scale_down_idle_time: Idle time before scaling down
diff --git a/docker/envs/core-services/shared.env.example b/docker/envs/core-services/shared.env.example
index 80cfe42c388..fca0b57d0c3 100644
--- a/docker/envs/core-services/shared.env.example
+++ b/docker/envs/core-services/shared.env.example
@@ -177,7 +177,7 @@ WORKFLOW_MAX_EXECUTION_TIME=1200
WORKFLOW_CALL_MAX_DEPTH=5
MAX_VARIABLE_SIZE=204800
WORKFLOW_FILE_UPLOAD_LIMIT=10
-GRAPH_ENGINE_MIN_WORKERS=1
+GRAPH_ENGINE_MIN_WORKERS=3
GRAPH_ENGINE_MAX_WORKERS=10
GRAPH_ENGINE_SCALE_UP_THRESHOLD=3
GRAPH_ENGINE_SCALE_DOWN_IDLE_TIME=5.0