Skip to content

fix(classify): set timeouts on PDF uploads - #720

Closed
DivyamTalwar wants to merge 1 commit into
VectifyAI:mainfrom
DivyamTalwar:fix/classify-upload-timeout
Closed

DivyamTalwar wants to merge 1 commit into
VectifyAI:mainfrom
DivyamTalwar:fix/classify-upload-timeout

Conversation

@DivyamTalwar

Copy link
Copy Markdown

Summary

Starting Page Classify with a PDF uses a multipart POST /classify/. That request could wait indefinitely for a response after the server received the upload. Give it a 30-second connection timeout and a 600-second read timeout, consistent with the upload defaults in #716 for the separate /doc/ route.

These settings apply to the upload request. Classification-job polling has its own timeout setting, and classification of an existing document ID keeps its existing request behavior.

Validation

  • A regression test inspects the exact timeout pair passed to Requests. It substitutes a short read timeout against a real slow-response HTTP server and confirms the adapter raises ReadTimeout after just one POST without polling.
  • 7 targeted Classify and transport tests passed.
  • git diff --check passes.

@rejojer

rejojer commented Dec 1, 2026

Copy link
Copy Markdown
Member

Thanks @DivyamTalwar. #733 covers the Page Classify upload too (and Page Split), so I'm closing this one. Same reason as in #716: a 30 s connect timeout caps sending the whole file and would fail a large PDF on a slow line. It's on main and ships in the next release.

@rejojer rejojer closed this Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants