local-web-search/.env.example
User ae56657d94 Raise renderer throughput: default concurrency 4->8, env-tunable CPU/RAM
Load testing the live deploy showed full-quality content-search caps at ~6
concurrent with 4 render slots; renders past the 60s stage timeout silently
drop pages (graceful degradation, not errors). Double the render slots and
size RAM/CPU to match.

- RENDER_CONCURRENCY default 4 -> 8 (the shared, stack-wide render cap)
- renderer deploy limits now env-driven: RENDERER_CPUS (default 4),
  RENDERER_MEMORY (default 4G), was hardcoded 2 CPU / 2G
- .env.example documents the concurrency<->RAM scaling rule (~350-450 MB per
  concurrent render + ~300 MB base) so raising slots doesn't OOM

Host must have the RAM/CPU; tune down on light VPSs (concurrency 4 -> 2G/2CPU).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 12:11:18 -07:00

49 lines
1.7 KiB
Text

# Copy to .env and adjust. All values shown are the defaults used in compose.
# Public port + bind address for the orchestrator (MCP + REST; only exposed
# service). Bind 127.0.0.1 to keep it localhost-only (reach it over a tunnel).
ORCHESTRATOR_PORT=8000
ORCHESTRATOR_BIND=0.0.0.0
# Bearer token required on every request (Authorization: Bearer <key>).
# Leave empty to DISABLE auth — only safe on trusted/LAN networks.
# install.sh generates a strong value automatically.
LWSS_API_KEY=
# Hostnames allowed to reach the MCP transport (DNS-rebinding protection).
# Behind a reverse proxy, set this to your public domain or the MCP endpoint
# returns 421 "Invalid Host header". Comma-separated; "*" disables the check.
# Leave empty for localhost-only.
MCP_ALLOWED_HOSTS=
# Cache TTLs (seconds)
RENDER_CACHE_TTL=3600
SEARCH_CACHE_TTL=300
EXTRACT_CACHE_TTL=3600
# Renderer
# RENDER_CONCURRENCY is the single biggest throughput lever: the max page
# renders in flight across the WHOLE stack (shared by all in-progress searches).
# Budget ~350-450 MB of RENDERER_MEMORY per concurrent render plus ~300 MB base,
# and scale the two together — raising concurrency without RAM causes OOM kills.
# The host must actually have this much free memory/CPU.
# concurrency 4 -> ~2G, 2 CPU (light VPS)
# concurrency 8 -> ~4G, 4 CPU (default)
# concurrency 12 -> ~6G, 4-6 CPU (heavier box)
RENDER_CONCURRENCY=8
RENDERER_MEMORY=4G
RENDERER_CPUS=4
RENDER_TIMEOUT_MS=30000
RENDER_WAIT_POLICY=networkidle
RENDER_RETRIES=1
# Politeness: max renders per domain per window
DOMAIN_RATE_LIMIT=10
DOMAIN_RATE_WINDOW_S=10
# Timeouts
STAGE_TIMEOUT_S=60
SEARCH_TIMEOUT_S=15
# SearXNG
SEARXNG_SECRET=change-me-lwss-internal