[OPS] Аудит проблем: check_certs переведён на локальный nginx с SNI (висел >120 с из-за DPI, теперь 0 с); RAG-пересбор падал из-за конкуренции с qwen3b в Ollama (190 таймаутов) — выгрузка моделей перед индексацией + перенос на 08:30 после ночного сбора; инкрементальный прогон: 1140 файлов пропущено, 0 ошибок. Открыты: n8n мёртв с 20.10, память (zram 100%, swap 12Г), прямой VPN 52% сбоев (CF 0/120), Ollama медленная, нет SSH к 229

This commit is contained in:
root committed 2026-11-16 20:40:06 +03:00
1 parent e38a0233a4
commit c13338cf0e
5 files changed
+93 -4

No files matched your search

+17
View File
@@ -108,7 +108,24 @@ def vec_lit(v):
return "[" + ",".join("%.6f" % x for x in v) + "]"
def unload_other_models():
"""Ollama на 229 не может держать qwen и эмбеддинги одновременно:
освобождаем память перед индексацией (иначе embeddings висят минутами)."""
import json as _j
import urllib.request as _u
for m in ("qwen2.5:3b", "qwen2.5:7b"):
try:
body = _j.dumps({"model": m, "keep_alive": 0}).encode()
req = _u.Request(LLM + "/api/generate", data=body, method="POST",
headers={"Content-Type": "application/json"})
_u.urlopen(req, timeout=20).read()
except Exception:
pass
def main():
unload_other_models()
rebuild = "--rebuild" in sys.argv
seed = "--seed" in sys.argv
pg = psycopg2.connect(rag.DSN)