diff --git a/service/pythonService/parse_doc.py b/service/pythonService/parse_doc.py
index ece0c2c..f12d1b2 100644
--- a/service/pythonService/parse_doc.py
+++ b/service/pythonService/parse_doc.py
@@ -25,7 +25,14 @@ import mistral_ocr_balancer
 import database
 
 os.environ.setdefault("HTTPX_FORCE_HTTP1", "1")
-ocr_balancer = mistral_ocr_balancer.get_shared_balancer()
+ocr_balancer = None
+
+
+def _get_mistral_ocr_balancer():
+    global ocr_balancer
+    if ocr_balancer is None:
+        ocr_balancer = mistral_ocr_balancer.get_shared_balancer()
+    return ocr_balancer
 
 
 def encode_pdf(pdf_path):
@@ -486,14 +493,14 @@ def process_pdf_chunk(pdf_path, index, save_images=False, output_dir=None, user_
             
         print(f"开始处理PDF块 {index}: {pdf_path}")
 
-        lease_timeout = ocr_balancer.default_timeout or 30.0
+        lease_timeout = _get_mistral_ocr_balancer().default_timeout or 30.0
         max_retries = 3
         retry_count = 0
         ocr_response = None
 
         while retry_count < max_retries:
             try:
-                with ocr_balancer.lease(timeout=lease_timeout) as client:
+                with _get_mistral_ocr_balancer().lease(timeout=lease_timeout) as client:
                     uploaded_pdf = None
                     try:
                         with open(pdf_path, "rb") as pdf_file:
@@ -721,7 +728,7 @@ def perform_pdf_ocr(pdf_path, save_images=False, output_dir=None,user_id=None):
     try:
         chunk_worker_limit = _env_int(
             "MISTRAL_OCR_CHUNK_MAX_WORKERS",
-            max(4, ocr_balancer.total_slots),
+            max(4, _get_mistral_ocr_balancer().total_slots),
         )
         max_workers = max(1, min(len(cuted_pdfs), chunk_worker_limit))
         with ThreadPoolExecutor(max_workers=max_workers) as executor:
