Skip to content

Add OCR_AGENT_CACHE_SIZE environment variable #4066

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2025

Conversation

CyMule
Copy link
Contributor

@CyMule CyMule commented Jul 18, 2025

Problem

OCR agents used unlimited caching, causing excessive memory usage. Each cached OCR agent consumes different amounts of memory, but can easily consume ~800MB.

Solution

Add OCR_AGENT_CACHE_SIZE environment variable to limit cached OCR agents per process.

  • Default: 1 cached agent
  • Configurable: Set to 0 to disable caching, or higher for more languages

@CyMule CyMule added this pull request to the merge queue Jul 18, 2025
Merged via the queue into main with commit a040483 Jul 18, 2025
37 checks passed
@CyMule CyMule deleted the fix/ocr-agent-cache-size-limit branch July 18, 2025 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants