Return partial search results before proxy timeout
build-push / docker (push) Successful in 4m26s

This commit is contained in:
AI Assistant
2026-03-16 15:17:25 +09:00
parent f5d03627be
commit 4133b9cd4d
5 changed files with 61 additions and 11 deletions
+12
View File
@@ -499,3 +499,15 @@
- `go test ./...`
- What is still risky or incomplete:
- If the browser is holding an older cached `app.js`, a hard refresh may still be needed before the proxied preview path is actually used on the client.
- Date: `2026-03-16`
- What changed:
- Added a request-level time budget so search collection, enrichment, supplemental exploration, and Gemini evaluation stop early enough to return partial results before the reverse proxy reaches `504 Gateway Time-out`.
- Reduced query variant count and per-source caps slightly again to cut the worst-case number of SearXNG calls in a single search request.
- Why it changed:
- The new debug log showed `/api/search` taking about `90s`, with the timeout happening during the Gemini stage after a very large number of search and enrichment steps.
- How it was verified:
- `go test ./...`
- `bash scripts/selftest.sh`
- What is still risky or incomplete:
- Partial-result responses are now preferred over hard 504s, so some searches may return fewer reviewed items when the time budget is exhausted.