Azure Document Intelligence custom extraction model not working on my specific computer

Niles Liu 25 Reputation points
2025-06-12T21:50:02.3+00:00

Im trying to use Azure Document Intelligence through VS code but for some reason the custom extraction models are taking forever to return anything, to the point where it hits 5 minutes and my code times out. Usually by 20-30 seconds I get a return, and it was working up to this morning.

Some things to note:

  • I know the document has at least reached Azure as my code tells me that the custom models are being run.
  • I tried running the exact same code on a colleagues computer and it works normally
  • I tried a few different APIs with no difference.
  • I even tried a vpn which made no difference.

I was told that after a couple days it should just go back to normal but would love to get this sorted out quickly.

Thanks

Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
2,100 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vinodh247 34,661 Reputation points MVP Volunteer Moderator
    2025-06-13T00:46:53.8333333+00:00

    Hi ,

    Thanks for reaching out to Microsoft Q&A.

    Since the same code and models work on another machine and not yours, this might be an environmental issue specific to your computer rather than a problem with azure document Intelligence or the model itself.

    1. Check Network-Level Issues
    • Firewall/Antivirus: Some aggressive firewall or endpoint protection software can delay or block outbound traffic or callbacks from Azure. Temporarily disable your antivirus or firewall and test.
    • Corporate VPNs/Proxies: Even if a VPN made no difference, make sure your network traffic is not being inspected or throttled.
      • curl -X GET https://<your-form-recognizer-endpoint>/formrecognizer/info
    • from your terminal and see if the latency is high or the request fails.
    1. VS Code-Specific Troubles

    Try running the same script from a terminal or another IDE (like Python directly or Jupyter). This rules out VS Code extensions or runtime configuration being the problem.

    • Disable VS Code extensions, especially:
      • Azure account/azure Tools
      Python Extensions that may interfere Anything related to HTTP debugging or proxies
    1. Environment Variables / Python Issues
    • Ensure your Python environment is clean. Some HTTP libraries or retry policies can mess with long-running async requests.
    • Recreate your virtual environment:

      python -m venv .venv source .venv/bin/activate # or .venv\Scripts\activate on Windows pip install -r requirements.txt

    • Use the official Azure SDK, not a REST wrapper, unless absolutely needed:

    from azure.ai.formrecognizer import DocumentAnalysisClient

    1. Check Request Throttling / Headers
    • Enable detailed logging for the client: :
      • import logging logging.basicConfig(level=logging.DEBUG)
        • Look for:
      • Any 429 (rate limits)
      • Connection retries
      • Network stalls
    1. Compare with Working Machine

    If urgent and none of the above helps:

    • Run the script from a Docker container or WSL with a clean image
    • Or use Azure Functions or Logic Apps to invoke the model instead, as a workaround

    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.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.