Skip to content

fix: remove separate health app - #27430

Merged
yuneng-berri merged 1 commit into
litellm_internal_stagingfrom
litellm_fix/remove-separate-health-app
May 8, 2026
Merged

fix: remove separate health app#27430
yuneng-berri merged 1 commit into
litellm_internal_stagingfrom
litellm_fix/remove-separate-health-app

Conversation

@yassin-berriai

@yassin-berriai yassin-berriai commented May 7, 2026

Copy link
Copy Markdown
Contributor

Relevant issues

Linear ticket

Resolves LIT-2908

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/test_litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Screenshots / Proof of Fix

Type

🆕 New Feature
🐛 Bug Fix
🧹 Refactoring
📖 Documentation
🚄 Infrastructure
✅ Test

Changes

Remove SEPARATE_HEALTH_APP and the supervisord scaffolding that existed solely to support it. This ran the proxy's health endpoints as a second FastAPI app on a second port, in a separate process, supervised alongside the main proxy. That defeats the purpose of a liveness probe.

The Kubernetes docs are explicit about what a liveness probe is for:

Liveness probes determine when to restart a container. For example, liveness probes could catch a deadlock, where an application is running, but unable to make progress.

Liveness probes must be configured carefully to ensure that they truly indicate unrecoverable application failure, for example a deadlock.

Kubernetes docs: Liveness, Readiness, and Startup Probes

A probe is supposed to fire when the application itself is wedged — event loop blocked, deadlocked under load, GIL-bound, etc. A probe served from a different process can't observe any of that. It happily returns 200 while the thing it's supposed to be checking is dead, which gives Kubernetes false confidence not to restart a deadlocked proxy.

Colin Breck names exactly this failure mode:

For example, if the service hosts two web servers — one for the service routes and one for status routes, like readiness and liveness probes, or metrics collection — the service can be slow or unresponsive, while the liveness probe route returns just fine.

Colin Breck: Kubernetes Liveness and Readiness Probes — How to Avoid Shooting Yourself in the Foot

Updated docs: BerriAI/litellm-docs#99

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov

codecov Bot commented May 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@greptile-apps

greptile-apps Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR removes the SEPARATE_HEALTH_APP feature — a supervisord-based pattern that ran health endpoints in a second FastAPI process on a separate port — replacing it with the straightforward single-process model where liveness/readiness probes are served by the same event loop they are meant to observe.

  • All three Dockerfiles drop supervisor from their apk installs and stop copying supervisord.conf; prod_entrypoint.sh removes the branch that exec'd supervisord when SEPARATE_HEALTH_APP=1.
  • docker/supervisord.conf and litellm/proxy/health_endpoints/health_app_factory.py are fully deleted; TestHealthAppFactory tests are removed alongside them and replaced with a new TestRunServerDbSetup class that exercises prisma DB setup logic via mocks.
  • Helm chart removes separateHealthApp/separateHealthPort values and hardens probe port references to always use "http".

Confidence Score: 5/5

Safe to merge — the removal is complete and consistent across all Dockerfiles, the Helm chart, the entrypoint, and the test suite.

Every artifact tied to the separate-health-app pattern (supervisord config, factory module, Dockerfile installs, Helm conditionals, entrypoint branch) is removed in lock-step. The replacement test class uses only mocks and makes no real network calls. The deliberate breaking change for existing SEPARATE_HEALTH_APP=1 users has already been reviewed and accepted by a senior developer in a prior thread.

No files require special attention.

Important Files Changed

Filename Overview
docker/prod_entrypoint.sh Removes the SEPARATE_HEALTH_APP=1 branch that exec'd supervisord; also fixes the missing trailing newline.
docker/supervisord.conf Entire file deleted; the supervisord configuration was the only artifact that tied the separate health process to the main process.
litellm/proxy/health_endpoints/health_app_factory.py Entire file deleted — the factory that spun up the second FastAPI app is no longer needed.
deploy/charts/litellm-helm/templates/deployment.yaml Removes separateHealthApp/separateHealthPort env injection and port definition; hardcodes liveness/readiness/startup probe port to "http".
deploy/charts/litellm-helm/values.yaml Removes separateHealthApp and separateHealthPort keys from the default values file.
tests/test_litellm/proxy/test_proxy_cli.py Removes TestHealthAppFactory (tests for the deleted factory) and adds TestRunServerDbSetup which tests prisma DB setup behaviour via mocks — no real network calls.
Dockerfile Removes supervisor from apk install and drops COPY docker/supervisord.conf — clean removal of the separate-health-app scaffolding.
docker/Dockerfile.database Mirrors main Dockerfile: removes supervisor from apk install and drops COPY docker/supervisord.conf.
docker/Dockerfile.non_root Removes supervisor from apk install and removes the multi-stage copy of supervisord.conf from the builder layer.
litellm/proxy/proxy_cli.py Removes the comment block advertising the separate-health-app uvicorn invocation pattern.

Reviews (2): Last reviewed commit: "fix: remove separate health app" | Re-trigger Greptile

Comment thread docker/prod_entrypoint.sh
Comment on lines 1 to +8
#!/bin/sh

if [ "$SEPARATE_HEALTH_APP" = "1" ]; then
export LITELLM_ARGS="$@"
export SUPERVISORD_STOPWAITSECS="${SUPERVISORD_STOPWAITSECS:-3600}"
exec supervisord -c /etc/supervisord.conf
fi

if [ "$USE_DDTRACE" = "true" ]; then
export DD_TRACE_OPENAI_ENABLED="False"
exec ddtrace-run litellm "$@"
else
exec litellm "$@"
fi No newline at end of file
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Breaking change for existing SEPARATE_HEALTH_APP users

Any deployment that currently runs with SEPARATE_HEALTH_APP=1 set as an environment variable was relying on supervisord launching a dedicated health-check process on a separate port. After this change, that env var is silently ignored and the regular single-process litellm server starts instead. Users who chose the separate health app specifically to keep probes alive under main-process load (the primary motivation for the feature) will lose that isolation with no migration path or deprecation notice.

Rule Used: What: avoid backwards-incompatible changes without... (source)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This flag should never have been supported, it causes k8s deployments to silently fail since health checks wont check the actual health of litellm

@yassin-berriai

Copy link
Copy Markdown
Contributor Author

@greptileai

@yuneng-berri
yuneng-berri merged commit d351abd into litellm_internal_staging May 8, 2026
113 of 115 checks passed
@yuneng-berri
yuneng-berri deleted the litellm_fix/remove-separate-health-app branch May 8, 2026 00:13
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
…rate-health-app

fix: remove separate health app
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.

4 participants