Skip to content

[Infra] Reduce llm_translation_testing parallelism and tolerate worker restarts - #25898

Merged
shin-berri merged 1 commit into
litellm_internal_stagingfrom
litellm_llmTranslationOomMitigation_staging
Apr 16, 2026
Merged

[Infra] Reduce llm_translation_testing parallelism and tolerate worker restarts#25898
shin-berri merged 1 commit into
litellm_internal_stagingfrom
litellm_llmTranslationOomMitigation_staging

Conversation

@yuneng-berri

Copy link
Copy Markdown
Collaborator

Relevant issues

Summary

Problem

Workers in the `llm_translation_testing` CircleCI job have been crashing mid-run with `[gw*] node down: Not properly terminated`, failing the job and blocking the pipeline. The crashes are OOM kills: multiple workers go down near the end of the run (97–99% through), and the log shows accumulating `Unclosed client session` / `Unclosed connector` messages before the final crash. Bumping `resource_class` from `large` to `xlarge` did not resolve it.

Fix

Two small, independent mitigations on the pytest invocation:

  • Drop xdist workers from `-n 8` to `-n 4`. Memory pressure per worker is the dominant failure mode, not CPU throughput; these tests are I/O-bound.
  • Add `--max-worker-restart=5` so a crashed worker is replaced and its remaining tests are redistributed, instead of failing the entire job on the first OOM.

Staging counterpart of #25897.

Testing

CI will exercise the new configuration when this PR runs.

Type

🚄 Infrastructure

…orker restarts

Workers in llm_translation_testing have been crashing mid-run with
"Not properly terminated" (OOM), even after bumping resource_class to
xlarge. Reduce xdist workers from 8 to 4 to lower peak memory, and add
--max-worker-restart=5 so a crashed worker is replaced instead of
failing the whole run.
@yuneng-berri
yuneng-berri requested a review from a team April 16, 2026 20:10
@vercel

vercel Bot commented Apr 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Apr 16, 2026 8:12pm

Request Review

@greptile-apps

greptile-apps Bot commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR reduces the llm_translation_testing CircleCI job's xdist parallelism from -n 8 to -n 4 and adds --max-worker-restart=5 to tolerate OOM-induced worker crashes, following a prior resource_class: large → xlarge bump that did not fully resolve the issue. Both mitigations are targeted and consistent with the I/O-bound nature of these tests.

Confidence Score: 5/5

Safe to merge — minimal, targeted CI config change with no impact on application code or test logic.

Single CI config file changed; only the pytest invocation for llm_translation_testing is modified (worker count halved, restart tolerance added). Both changes directly address the described OOM failure mode. CI supply-chain rules (pinned uv version, checksum verified) are already satisfied and untouched. No P0/P1 findings.

No files require special attention.

Important Files Changed

Filename Overview
.circleci/config.yml Reduces llm_translation_testing xdist workers from -n 8 to -n 4 and adds --max-worker-restart=5 to tolerate OOM-induced worker crashes

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[llm_translation_testing job starts\nresource_class: xlarge] --> B[Install deps\nuv 0.10.9 + checksum verified]
    B --> C[pytest -n 4\n--timeout=120\n--max-worker-restart=5\n--retries 2]
    C --> D{Worker crash?}
    D -- No --> E[Test completes normally]
    D -- Yes, restarts ≤ 5 --> F[Pending tests redistributed\nto remaining workers]
    F --> D
    D -- Yes, restarts > 5 --> G[Job fails]
    E --> H[Store JUnit results]
Loading

Reviews (1): Last reviewed commit: "[Infra] CI: reduce llm_translation_testi..." | Re-trigger Greptile

@shin-berri
shin-berri self-requested a review April 16, 2026 20:15
@shin-berri
shin-berri merged commit 7279dca into litellm_internal_staging Apr 16, 2026
95 of 99 checks passed
@shin-berri
shin-berri deleted the litellm_llmTranslationOomMitigation_staging branch April 16, 2026 20:31
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
…omMitigation_staging

[Infra] Reduce llm_translation_testing parallelism and tolerate worker restarts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants