fix(infra): raise MLflow memory limit; cut uvicorn workers to 2 - #32
Merged
Conversation
Ilk model artifact'i yuklenirken MLflow OOMKilled olup CrashLoopBackOff'a girdi (4 restart). Artifact'lar sunucu proxy'sinden gectigi icin model dosyasi MinIO'ya giderken MLflow'un bellegini kullaniyor; 2Gi limiti yetmedi. Istemci yuklemeyi yeniden denedigi icin her ayaga kalkista tekrar oldu — dongu kendini besliyordu. - limit 2Gi -> 6Gi, request 512Mi -> 1Gi - --workers 2: MLflow 3.x uvicorn'u varsayilan 4 worker aciyor ve her biri uygulamayi ayri yukluyor; tek kullanicili tracking sunucusunda 2 yeterli, taban bellek yariya iniyor. - ML-TRAINING.md sorun giderme tablosuna satir eklendi: bu belirtide once Job silinmeli, yoksa MLflow toparlanamaz. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Enskc05
added a commit
that referenced
this pull request
Aug 7, 2026
#32'de limit 6Gi'ye cikarilmisti; o sayi olculmeden, guvenli tarafta kalmak icin secilmisti. Basarili model yuklemesi sonrasi Prometheus'tan olculdu: max_over_time(container_memory_working_set_bytes{ namespace="deephorizon-ml",container="mlflow"}[45m]) = 1.71 GiB 4Gi bunun ~2.3 kati; tek GPU sunucusunda bosa rezervasyon yapmadan buyuyen artifact'lara pay birakiyor. Olcum ve yeniden olcme sorgusu manifest'e yorum olarak islendi — kubectl top bu kumede calismiyor (metrics-server addon'u kapali), o yuzden yontem yaziyla kalsin. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(infra): raise MLflow memory limit; cut uvicorn workers to 2
MLflow was
OOMKilledwhile receiving the first model artifact and enteredCrashLoopBackOff(4 restarts).Cause
Artifacts are proxied through the tracking server
(
--artifacts-destinationwith the default--serve-artifactsbehaviour), sothe model file passes through MLflow's memory on its way to MinIO. A 2Gi limit
did not cover that, and MLflow 3.x starts four uvicorn workers by default —
each loading the app — so the baseline was already high before any upload.
The failure was self-sustaining: the training client retried the upload, and
each retry killed MLflow again as soon as it came back up. Deleting
The failure was self-sustaining: the training client retried the upl
each retry killed MLflow again as soon as it came back up. Deleting the
training Job is what breaks the loop; raising the limit alone would not have.
Changes
2Gi→6Gi, request512Mi→1Gi.--workers 2. A single-tenant tracking server does not need four; thisroughly halves idle memory.
docs/runbooks/ML-TRAINING.mdcovering thesymptom (
RemoteDisconnected→Connection refusedafter trainingcompletes) and the order of recovery: delete the Job first.
Notes
6Gi is deliberately generous — the pod was deleted before the checkpoint size
could be measured. Once an upload succeeds,
kubectl top pod -l app=mlflowwill show real peak usage and the limit can be tightened.
The underlying issue is architectural: proxying artifacts through the tracking
server does not scale with model size. The alternative is having cli
directly to MinIO, which
docs/DEVOPS.md§10 deliberately avoided so the MLside would not need S3 credentials. Worth revisiting as models grow; raising
the limit is the right move for now.