deepseek-ai / deepseek-ai/DeepSeek-OCR
[Bug] System crash when processing large PDF (2800+ pages) - possible memory leak
- Dominant language
- Python
- Stars
- 23.9k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Environment**
- **OS:** Ubuntu (x86_64) on Amazon EC2
- **Instance Type:** g5.2xlarge
- **GPU:** NVIDIA A10 (24GB VRAM)
**Description**
The system performs excellently on smaller PDFs but crashes consistently when processing large documents without leaving any error logs.
**Performance Comparison**
- ✅ **400-page PDF:** Works perfectly, ~1 minute (20x faster than Docling pipeline which takes ~20 minutes)
- ❌ **2800-page PDF:** System crashes during image processing stage
**Steps to Reproduce**
1. Set up DeepSeek OCR on AWS EC2 g5.2xlarge instance
2. Process a 2800-page PDF document
3. Observe the system crash during the image processing phase
**Expected Behavior**
The system should process large PDFs successfully, potentially with longer processing time proportional to the document size.
**Actual Behavior**
- The system crashes without generating any error logs or stack traces
- Crash occurs consistently at the image processing stage
- The issue is 100% reproducible with the same 2800-page PDF
**Suspected Root Cause**
Given the stability with smaller documents and consistent crashes with large ones, this might be related to:
- Memory leak during batch processing
- Insufficient memory management for large document sets
- Missing memory cleanup between page processing
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.