Internal Server Error when running Azure DI Layout with High Resolution+Style with Markdown output

Nicolas 0 Reputation points
2025-08-01T06:14:08.13+00:00

Hi!
Using PDF document with quite a lot of text, I've noticed that I'm consistently getting a InternalServerError during analysis.
Only way to go through is to either change the output format back to text, or to remove one of the two feature flag.
Is that expected?

Azure AI Document Intelligence
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vinodh247 36,031 Reputation points MVP Volunteer Moderator
    2025-08-03T11:13:52.7266667+00:00

    Hi ,

    Thanks for reaching out to Microsoft Q&A.

    This might be due to...

    1. High Resource Demand:
      • The High Resolution and Style flags increase the computational load significantly.
      • When used together on large documents, they can exceed internal processing limits, especially on memory or time constraints.
    2. Markdown Output Serialization:
      • The Markdown output format requires more post-processing compared to raw JSON or plain text.
      • This gets compounded when style and layout metadata are involved, which increases the size and complexity of the response.
    3. Backend Timeout or Resource Limit:
      • The model likely hits an internal timeout or quota (ex: memory, inference time), triggering a 500 error rather than a graceful fallback.

    Workarounds:

    • Use only one flag at a time (as you already noted): Either use High Resolution or Style, but not both together.
    • Switch back to plain text or JSON output for large documents.
    • Split large PDFs into smaller chunks (10 to 15 pages per request).
    • If Markdown is essential, consider post-processing the output yourself: Get raw JSON > parse it locally > convert to Markdown with your own logic.

    Currently, this limitation is not well-documented. However, it has been observed by multiple users in real-world usage and GitHub issues. Internally, it likely relates to system-level resource caps.

    Please 'Upvote'(Thumbs-up) and 'Accept' as answer if the reply was helpful. This will be benefitting other community members who face the same issue.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.