Multiple indexing threads multiply memory consumption regardless of limits
warningResource ContentionUpdated Oct 6, 2025(via Exa)
Technologies:
How to detect:
Setting MEILI_MAX_INDEXING_THREADS to 8 causes Meilisearch to consume nearly all available RAM (64GB) within hours, even when MEILI_MAX_INDEXING_MEMORY is set to 20GB. Reducing threads to 1 dramatically decreases consumption to ~2GB. The memory limit per thread is unclear, suggesting possible per-thread allocation or inadequate limit enforcement.
Recommended action:
For memory-constrained environments or during high-volume indexing (millions of documents), reduce MEILI_MAX_INDEXING_THREADS to 1 or 2. Monitor memory with 'docker stats' and adjust thread count based on available RAM. Consider that each thread may independently consume memory beyond the configured indexing memory limit.