Skip to content

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

fix: image parser concurrency error

wizardchen0e1d7edca3bf
diff --git a/services/docreader/src/parser/base_parser.py b/services/docreader/src/parser/base_parser.py
index e12897bee..73dc701a4 100644
--- a/services/docreader/src/parser/base_parser.py
+++ b/services/docreader/src/parser/base_parser.py
@@ -1042,14 +1042,6 @@ class BaseParser(ABC):
Returns:
Processed Chunk object
"""
- # Set request ID context in the asynchronous task
- try:
- if current_request_id:
- from utils.request import set_request_id
- set_request_id(current_request_id)
- logger.info(f"Chunk processing task #{chunk_idx+1} setting request ID: {current_request_id}")
- except Exception as e:
- logger.warning(f"Failed to set request ID in Chunk processing task: {str(e)}")
logger.info(f"Starting to process images in Chunk #{chunk_idx+1}/{total_chunks}")
@@ -1146,7 +1138,7 @@ class BaseParser(ABC):
# Create and run all Chunk concurrent processing tasks
async def process_all_chunks():
# Set max concurrency, reduce concurrency to avoid resource contention
- max_concurrency = min(self.max_concurrent_tasks, 5) # Reduce concurrency
+ max_concurrency = min(self.max_concurrent_tasks, 1) # Reduce concurrency
# Use semaphore to limit concurrency
semaphore = asyncio.Semaphore(max_concurrency)