From 95efae006075d99c1c282144412415d0f19d634c Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Mon, 11 May 2026 11:45:32 +0800 Subject: [PATCH] Configure stable OpenClaw concurrency --- host_vars/jp-xhttp-contabo.svc.plus/gateway_openclaw.yml | 2 ++ roles/vhosts/gateway_openclaw/defaults/main.yml | 1 + roles/vhosts/gateway_openclaw/templates/openclaw.json.j2 | 3 ++- roles/vhosts/xworkmate_bridge/defaults/main.yml | 6 ++++++ 4 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 host_vars/jp-xhttp-contabo.svc.plus/gateway_openclaw.yml diff --git a/host_vars/jp-xhttp-contabo.svc.plus/gateway_openclaw.yml b/host_vars/jp-xhttp-contabo.svc.plus/gateway_openclaw.yml new file mode 100644 index 0000000..444ec68 --- /dev/null +++ b/host_vars/jp-xhttp-contabo.svc.plus/gateway_openclaw.yml @@ -0,0 +1,2 @@ +--- +gateway_openclaw_acp_enabled: true diff --git a/roles/vhosts/gateway_openclaw/defaults/main.yml b/roles/vhosts/gateway_openclaw/defaults/main.yml index be488c8..c46dd28 100644 --- a/roles/vhosts/gateway_openclaw/defaults/main.yml +++ b/roles/vhosts/gateway_openclaw/defaults/main.yml @@ -40,6 +40,7 @@ gateway_openclaw_allowed_origins: gateway_openclaw_minimal_gateway_enabled: true gateway_openclaw_acp_enabled: false +gateway_openclaw_acp_max_concurrent_sessions: 2 gateway_openclaw_acp_backend: acpx gateway_openclaw_acp_default_agent: codex gateway_openclaw_codex_app_server_url: ws://127.0.0.1:9001 diff --git a/roles/vhosts/gateway_openclaw/templates/openclaw.json.j2 b/roles/vhosts/gateway_openclaw/templates/openclaw.json.j2 index fda728a..a714071 100644 --- a/roles/vhosts/gateway_openclaw/templates/openclaw.json.j2 +++ b/roles/vhosts/gateway_openclaw/templates/openclaw.json.j2 @@ -150,7 +150,8 @@ "enabled": {{ gateway_openclaw_acp_enabled | bool | to_json }} }, "backend": {{ gateway_openclaw_acp_backend | to_json }}, - "defaultAgent": {{ gateway_openclaw_acp_default_agent | to_json }} + "defaultAgent": {{ gateway_openclaw_acp_default_agent | to_json }}, + "maxConcurrentSessions": {{ gateway_openclaw_acp_max_concurrent_sessions | int }} }, "plugins": { "entries": { diff --git a/roles/vhosts/xworkmate_bridge/defaults/main.yml b/roles/vhosts/xworkmate_bridge/defaults/main.yml index 91e4314..c82786c 100644 --- a/roles/vhosts/xworkmate_bridge/defaults/main.yml +++ b/roles/vhosts/xworkmate_bridge/defaults/main.yml @@ -17,6 +17,12 @@ xworkmate_bridge_service_environment: BRIDGE_AUTH_TOKEN: "{{ xworkmate_bridge_effective_auth_token | default(xworkmate_bridge_auth_token) }}" BRIDGE_CONFIG_PATH: "{{ xworkmate_bridge_config_file }}" IMAGE: "{{ xworkmate_bridge_effective_runtime_image_ref | default(xworkmate_bridge_runtime_image_ref) }}" + XWORKMATE_BRIDGE_OPENCLAW_GATEWAY_MAX_ACTIVE: "{{ xworkmate_bridge_openclaw_gateway_max_active }}" + XWORKMATE_BRIDGE_OPENCLAW_GATEWAY_MAX_QUEUED: "{{ xworkmate_bridge_openclaw_gateway_max_queued }}" + XWORKMATE_BRIDGE_OPENCLAW_GATEWAY_QUEUE_TIMEOUT: "{{ xworkmate_bridge_openclaw_gateway_queue_timeout }}" +xworkmate_bridge_openclaw_gateway_max_active: 2 +xworkmate_bridge_openclaw_gateway_max_queued: 20 +xworkmate_bridge_openclaw_gateway_queue_timeout: 10m xworkmate_bridge_required_services: - acp-codex.service - acp-opencode.service