diff --git a/app/workers/marker_worker.py b/app/workers/marker_worker.py index 20302ee..d653866 100644 --- a/app/workers/marker_worker.py +++ b/app/workers/marker_worker.py @@ -167,8 +167,13 @@ async def process(document_id: int, session: AsyncSession) -> None: return logger.exception(f"[marker] http error id={document_id}: {exc}") raise - except (httpx.ConnectError, httpx.TimeoutException) as exc: - logger.warning(f"[marker] transient error id={document_id}: {exc}") + except httpx.TransportError as exc: + # transport 계층 오류 — Connect/Read/Write/RemoteProtocol/Timeout 류 전부 transient. + # marker-service 응답끊김(RemoteProtocolError) / 모델 워밍업 / 큰 PDF I/O 끊김 등에서 발생. + # queue retry 대상 (max_attempts 까지 자동 재시도). + logger.warning( + f"[marker] transient error id={document_id} kind={type(exc).__name__}: {exc}" + ) raise except Exception as exc: logger.exception(f"[marker] unexpected error id={document_id}: {exc}")