Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/weekly-index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
JIXIA_REPO: https://github.com/frenzymath/jixia
MODULE_NAMES: Physlib
DRY_RUN: 'false'
# Each jixia worker loads ~2-3 GB of Mathlib; cap concurrency so the
# runner (16 GB) doesn't get OOM-killed during the load step.
JIXIA_MAX_WORKERS: '2'
CHROMA_PATH: chroma
CONNECTION_STRING: ${{ secrets.DATABASE_URL }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
Expand Down
6 changes: 6 additions & 0 deletions database/jixia_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,18 @@ def topological_sort():
with conn.cursor() as cursor:
lean_sysroot = Path(os.environ["LEAN_SYSROOT"])
lean_src = lean_sysroot / "src" / "lean"
# Each jixia worker loads the full Mathlib environment (~2-3 GB), so the
# default thread count (CPUs + 4) can exhaust memory and get the process
# OOM-killed. Cap it via JIXIA_MAX_WORKERS in memory-constrained CI.
max_workers_env = os.environ.get("JIXIA_MAX_WORKERS")
max_workers = int(max_workers_env) if max_workers_env else None
Comment on lines +182 to +183
all_modules = []
for d in project.root, lean_src:
results = project.batch_run_jixia(
base_dir=d,
prefixes=prefixes,
plugins=["module", "declaration", "symbol"],
max_workers=max_workers,
)
Comment on lines 186 to 191
modules = [r[0] for r in results]
load_module(modules, d)
Expand Down
Loading