From ffd3fd1d7c7a22e7e79254d3ed42f36bed28248c Mon Sep 17 00:00:00 2001 From: Benjamin Admin Date: Fri, 13 Mar 2026 18:24:55 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20remove=20warmup=20OCR=20call=20=E2=80=94?= =?UTF-8?q?=20causes=20OOM=20on=206G=20container?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The warmup OCR call during startup pushes memory over 6G and causes OOM kills + restart loops. First real OCR request will be slow (JIT compilation) but container stays stable. Co-Authored-By: Claude Opus 4.6 --- paddleocr-service/main.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/paddleocr-service/main.py b/paddleocr-service/main.py index 455136d..04b7e77 100644 --- a/paddleocr-service/main.py +++ b/paddleocr-service/main.py @@ -48,13 +48,6 @@ def _load_model(): logger.info(f"PaddleOCR init strategy {i} failed: {e}") else: raise RuntimeError("All PaddleOCR init strategies failed") - # Warmup: run a dummy OCR to trigger JIT compilation - # Without this, the first real request takes minutes on CPU - logger.info("Running warmup OCR (JIT compilation)...") - dummy = np.ones((50, 200, 3), dtype=np.uint8) * 255 - _engine.ocr(dummy) - logger.info("Warmup complete") - _ready = True logger.info("PaddleOCR model loaded successfully — ready to serve") except Exception as e: