加入 Ollama GCP failover 診斷與 unhealthy skip
All checks were successful
CD Pipeline / deploy (push) Successful in 1m5s
All checks were successful
CD Pipeline / deploy (push) Successful in 1m5s
This commit is contained in:
@@ -122,3 +122,20 @@
|
||||
- **原因**: Blackbox 或外部探測打 Dashboard 首頁 `/`,會觸發商品看板與 PChome 比價重型查詢;少量 sync worker 被長請求佔滿時,輕量 `/health` 也會排隊逾時。
|
||||
- **檢查**: `docker logs momo-pro-system --since 20m | grep 'Blackbox-Exporter'` 應只看到 `GET /health`;`docker stats momo-db` 若接近多核心滿載,需同步看 `pg_stat_activity` 的 `latest_momo` 類查詢。
|
||||
- **修復**: 188 的 `monitoring/prometheus.yml` 與 110 的 `/home/wooo/monitoring/prometheus.yml` blackbox HTTP targets 必須使用 `/health`;Gunicorn 保持 `worker_class=gthread`、`GUNICORN_THREADS=4`、`preload_app=False`。
|
||||
|
||||
### 12. GCP-A Ollama refused / 110:11435 502
|
||||
- **快速診斷**: 在 repo 根目錄執行 `scripts/ops/diagnose_ollama_gcp_failover.sh`。此腳本不需要 root,也不會修改 nginx、Docker、GCP 或正式服務。
|
||||
- **判讀**:
|
||||
- `GCP-A direct /api/version` 失敗且 `GCP-B direct` 成功:primary VM、防火牆或 Ollama 服務異常;應用層會走 GCP-A → GCP-B → 111,但仍需修 primary。
|
||||
- `110 proxy primary` 502 且 `110 proxy secondary` 成功:110 的 `11435` 固定代理 GCP-A,所以 primary 掛時舊 proxy 入口會失敗;需 110 root 才能改 nginx 或 reload。
|
||||
- `GCP-B embed` 成功但耗時接近 30s:表示 `bge-m3` runner 慢但可用;若經常超過 30s,應處理 GCP-B runner/CPU/模型併發,不要把 111 納入背景 embedding。
|
||||
- **GCP-A 修復方向**:
|
||||
- 有 GCP/SSH 權限時,先確認 VM 是否開機、Firewall 是否開 `22` 與 `11434`、Ollama process 是否在 listen。
|
||||
- 110 現況若 `ssh gcp-a` 回 `port 22: Connection refused`,代表目前跳板無法進主機,不能靠 momo-pro app 修復。
|
||||
- **110 proxy failover 方向**:
|
||||
- 需要 root:`sudo nginx -t`、修改 `/etc/nginx/sites-enabled/110-ollama-proxy.conf`、`sudo systemctl reload nginx`。
|
||||
- 若要讓 `11435` 在 GCP-A 掛時 fallback 到 GCP-B,必須明確標註這是 proxy failover,不代表 GCP-A 已恢復;host health 仍應以 direct GCP-A 探針為準。
|
||||
- **紅線**:
|
||||
- 不要把背景 `bge-m3` 任務改落 111。
|
||||
- 不要用更長 timeout 掩蓋 GCP-A refused;GCP-A 是 primary infra blocker。
|
||||
- 沒有 110 root 或 GCP SSH 權限時,只能完成診斷、文件與應用層降級,不能假裝已修復 primary。
|
||||
|
||||
Reference in New Issue
Block a user