An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
Hello @Dean Parker
The InternalServerError: An unexpected error occurred during Azure Document Intelligence custom model training is a known issue with several root causes.
Step-by-Step Troubleshooting
- Check Training Data Limits (Most Common Cause)
Your training dataset exceeds the allowed limits
RequirementCustom Extraction Model--------Max Pages500 pages totalMax Size50 MB for all files combinedFile TypesPDF, JPEG, PNG only [stackoverflow]Action: Reduce your training dataset to ≤500 pages and ≤50 MB total.
- Check Input File Requirements
- Password-protected PDFs → Not supported
- Encrypted files → Remove encryption
- Corrupted/malformed files → Test with clean documents
- Overly scanned or high-DPI images → Can slow processing
Action: Test with a small, clean document first (under 5 MB, 10 pages).[stackoverflow]
- Verify Labels.json Alignment
Misaligned labels in your training data is a frequent cause:
- Ensure
labels.jsonmatches your document filenames exactly - Check that all labeled fields exist in the document
- Verify no duplicate or conflicting labels
- Customer-Managed Keys (CMK) Issue
If using Azure Key Vault for encryption:
- Verify the Document Intelligence service has proper Key Vault access permissions
- Temporarily switch to Microsoft-managed keys to isolate encryption-related problems
- Try a Different Azure Region
Some users reported regional instability causing this error. Try deploying your resource in a different region.
- Train a New Model (Not Update Existing)
Metadata conflicts can occur when updating existing models:
- Train a new model with a fresh model ID instead of updating
- Check Your Tier
- F0 (Free tier) has strict limitations and may fail with larger datasets
- S0 (Pay-As-You-Go) is recommended for custom model training
Hope this helps! Let me know which step resolves your issue. Do let me know if you have any further querieds.
Thankyou!