fix(embed): fast-fail + auto-restart Ollama on solved-search hang
Embeddings timeout was 120s, causing multi-minute hangs when Ollama was down during F4/F6/F7 solved-search. Now: connect_timeout=5s across all HTTP clients (REST + Ollama), read_timeout reduced to 30s for embeddings, and OllamaEmbeddings auto-restarts the server on ConnectionError before degrading gracefully. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -52,6 +52,7 @@ class RestConfig(BaseModel):
|
||||
base_url: str
|
||||
api_key: str
|
||||
timeout: int = 30
|
||||
connect_timeout: int = 5
|
||||
ssl_ca: str | None = None # path al certificato CA (per server con CA interna)
|
||||
|
||||
|
||||
@@ -105,7 +106,8 @@ class EmbeddingsConfig(BaseModel):
|
||||
model: str = "nomic-embed-text-v2-moe"
|
||||
dim: int = 768
|
||||
batch_size: int = 32
|
||||
timeout: int = 120
|
||||
timeout: int = 30
|
||||
connect_timeout: int = 5
|
||||
bin: str = "ollama"
|
||||
start_cmd: list[str] | None = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user