Skip to content

Commit fa3501d

Browse files
Fix Iris parser httpx read timeout for file uploads (#524)
The httpx.AsyncClient was created without a timeout parameter, defaulting to 5 seconds for reads. This is too short for uploading PDFs to presigned URLs and waiting for Iris API responses. Set explicit timeouts: 30s default, 120s for reads.
1 parent f88b50a commit fa3501d

File tree

1 file changed

+1
-1
lines changed
  • hindsight-api/hindsight_api/engine/parsers

1 file changed

+1
-1
lines changed

hindsight-api/hindsight_api/engine/parsers/iris.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ async def convert(self, file_data: bytes, filename: str) -> str:
6262
"""
6363
content_type = mimetypes.guess_type(filename)[0] or "application/octet-stream"
6464

65-
async with httpx.AsyncClient() as client:
65+
async with httpx.AsyncClient(timeout=httpx.Timeout(30.0, read=120.0)) as client:
6666
# Step 1: Request a presigned upload URL
6767
init_resp = await client.post(
6868
f"{_IRIS_BASE_URL}/org/{self._org_id}/files",

0 commit comments

Comments
 (0)