Skip to content

Keep File Search syncs calm when the extractor restarts; worker healthcheck (#1383) - #1400

Merged
helpcodeai merged 1 commit into
mainfrom
fix/file-search-resilience
Nov 1, 2026
Merged

helpcodeai merged 1 commit into
mainfrom
fix/file-search-resilience

Conversation

@helpcodeai

Copy link
Copy Markdown
Contributor

Summary

Found while monitoring File Search on the Cloud (2026-11-01, after lowering the extractor's memory limit).

  • Restarting file-extractor (a deploy, or its memory limit) ended the running sync as failed in the Files panel, although no file was at fault. It is now a partial run with a clear message, and the sync continues in two minutes (was five). No file is penalised, as before.
  • files-worker inherited the image's healthcheck, which probes the backend on :4000, so it always showed unhealthy. It now probes its own /internal/health with the worker token.
  • Lower memory defaults (owner's choice "option A", to keep the droplet safe):
    • The worker's Node heap is 512 MB, passed as FILES_WORKER_MAX_OLD_SPACE_MB. The worker container stays at 1 GB, because on Enterprise two syncs can each hold a 200 MB file.
    • The extractor defaults to 1.5 GB on the Cloud.

Cloud and self-hosted behave the same; only the Cloud's extractor default differs.

Type

  • Bug fix

Testing

Directory Command Result
packages/backend npx tsc --noEmit -p tsconfig.json clean
packages/backend npx jest src/ee/file-search src/file-search --maxWorkers=4 52 passed, 5 skipped
root docker compose -f docker-compose.cloud.yml config -q, same for docker-compose.yml valid
Cloud worker container the new healthcheck command (wget with X-Worker-Token to /internal/health) HEALTH_OK

Related Issues

Relates to #1383, #1379.

…hcheck (#1383)

An extractor restart (deploy or memory limit) ended the sync as failed;
it is now a partial run that continues in two minutes. files-worker had
the backend's healthcheck (port 4000) and always showed unhealthy; it
now probes its own /internal/health. Lower memory defaults: worker heap
512 MB, extractor 1.5 GB on the Cloud.
@helpcodeai
helpcodeai enabled auto-merge (squash) November 1, 2026 16:36
@helpcodeai
helpcodeai merged commit 1d90f83 into main Nov 1, 2026
15 checks passed
@helpcodeai
helpcodeai deleted the fix/file-search-resilience branch November 1, 2026 16:50
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant