Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,984 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
When I call the Azure Document Intelligence API from a modal serverless function, I get this "azure.core.exceptions.ServiceRequestError: EOF occurred in violation of protocol (_ssl.c:2396)" error. It works for small documents, but I face this SSL issue for longer documents that take over 2 min to process.
The Azure Document Intelligence API works fine every time when I call it from my machine or AWS ec2 instance for all document sizes, but I'm having issues when calling from a modal serverless function. How should I debug? Please help.
Here is the full error message:
Traceback (most recent call last):
Expand
File "/pkg/modal/_container_entrypoint.py", line 372, in handle_input_exception
yield
File "/pkg/modal/_container_entrypoint.py", line 602, in run_input
value = await res
File "/root/cloud_functions_filings.py", line 171, in scrape_chunk_embed_filings
_, tables_list, sections_list = await process_pdf(
File "/root/services/ocr.py", line 206, in process_pdf
for future in futures:
File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 621, in result_iterator
yield _result_or_cancel(fs.pop())
File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 319, in _result_or_cancel
return fut.result(timeout)
File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 451, in result
return self.__get_result()
File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/root/services/ocr.py", line 189, in