You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(health): one probe timing out under load makes the whole system read down, and code-analysis workers run at normal priority #20483
On the local install at f88cd37, during a codebase analysis on 2026-11-01 around 12:50 Riga, GET /api/system/health read down and the backend felt slow. Read-only measurements:
Measure
Result
Load
43.9 on 22 cores, 13 GB memory available
CPU by group (ps, sum of %CPU)
development tooling on the same machine about 1440% (guards and hooks 1053, local pytest 390); backend and its children 388; other 344
Backend main process
25% CPU; /api/health answered in 43-131 ms over 6 calls, so its event loop was not stuck
/api/system/health
0.4-0.95 s and degraded over 6 calls; 3.1-4.8 s and down on earlier calls
The llc probe
258-632 ms over 6 calls, 1072 ms on another; one sample down with "probe timed out after 2.0s", latency 3751 ms
Children of the backend
the analysis worker at nice 10, 204%; two code-analysis pool workers at nice 0, 86% and 73%, running about 16 minutes
Logs
Duplicate detection timed out after 120.0s at 12:33, 12:40 and 12:45; api_endpoint_analysis was cancelled; /api/analytics/codebase/endpoint-analysis returned 504
What this shows
down came from one probe. llc exceeded its 2 s budget while the machine was CPU-contended, and one timed-out probe makes the whole system read down. No service was found to be down in these samples.
llc also reads degraded for its own reason, unrelated to load: agents_overdue_degraded: 1, and scheduler_last_tick_age_seconds is null.
The pool workers run at normal priority, while indexing_worker.py lowers itself with os.nice(10). They compete with the server's own work.
Not known
What share of the slowness each source caused. Most CPU on this machine was development tooling, which a normal install does not have, so this run may overstate it. Nothing was stopped to compare.
Whether the pool workers were still doing the work of scans whose deadline had passed. The log warns "pooled work may still" run, and I did not sample their stacks.
Why llc needs 250-1000 ms when its docstring says well under 500 ms.
Acceptance criteria
Code-analysis pool workers run at the same lowered priority as the indexing worker (test).
A probe that only timed out does not make the whole system read down; it reads as unknown or degraded, and a probe that reports a real failure still reads down (test).
Host: during a codebase analysis, /api/system/health does not read down while /api/health answers normally, with output pasted here.
Verified against origin/main after the merge train (PR #20598) landed (#20494 is a member).
AC
Evidence
Code-analysis pool workers run at the lowered priority (test)
autobot-backend/code_intelligence/shared/process_offload.py:82os.nice(_WORKER_NICE) via the pool initializer (:132); process_offload_test.py:541test_pool_workers_run_at_a_lowered_priority_and_the_backend_does_not (real spawned worker).
A timeout-only probe reads degraded/unknown, a real failure still down (test)
autobot-backend/api/system_health.py:148 detail "probe timed out after ...s"; system_health_timeout_20483_test.py: test_a_timeout_is_degraded_and_says_it_timed_out, test_a_real_failure_still_reads_down.
Host: /api/system/health does not read down during an analysis, output pasted
NOT MET. Needs a host run during a codebase analysis.
Stays open for the host criterion, plus two unaddressed notes: why the llc probe takes 250-1000 ms, and whether workers keep running past a scan's deadline.
Activity
github-actions commentedon Nov 1, 2026
needs-structurecleared: goal milestone, matching phase label and native parent (or sub-issues) are all present (#19522).mrveiss commentedon Nov 1, 2026
Instance of the status-signal class on #20517. The fix stays here in #20494.
github-actions commentedon Nov 2, 2026
Landed via the merge train (#20598, merge
87eae8acf8) via #20494mrveiss commentedon Nov 2, 2026
Verified against
origin/mainafter the merge train (PR #20598) landed (#20494 is a member).autobot-backend/code_intelligence/shared/process_offload.py:82os.nice(_WORKER_NICE)via the poolinitializer(:132);process_offload_test.py:541test_pool_workers_run_at_a_lowered_priority_and_the_backend_does_not(real spawned worker).down(test)autobot-backend/api/system_health.py:148detail "probe timed out after ...s";system_health_timeout_20483_test.py:test_a_timeout_is_degraded_and_says_it_timed_out,test_a_real_failure_still_reads_down./api/system/healthdoes not readdownduring an analysis, output pastedStays open for the host criterion, plus two unaddressed notes: why the
llcprobe takes 250-1000 ms, and whether workers keep running past a scan's deadline.