# ERR FT.CREATE failed: Out of memory allocating index 'myidx'

- **ID:** `redis/redisearch-index-out-of-memory`
- **Domain:** redis
- **Category:** resource_error
- **Error Code:** `ERR`
- **Verification:** ai_generated
- **Fix Rate:** 78%

## Root Cause

Redis Search module failed to allocate memory for new index due to maxmemory limit or system OOM.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 7.2.0 | active | — | — |
| 7.4.0 | active | — | — |
| 8.0.0 | active | — | — |

## Workarounds

1. **Increase maxmemory: CONFIG SET maxmemory 2gb. Then retry FT.CREATE. Monitor with INFO memory.** (80% success)
   ```
   Increase maxmemory: CONFIG SET maxmemory 2gb. Then retry FT.CREATE. Monitor with INFO memory.
   ```
2. **Drop unused indexes to free memory: FT.DROPINDEX oldidx DD (DD deletes documents). Then retry.** (75% success)
   ```
   Drop unused indexes to free memory: FT.DROPINDEX oldidx DD (DD deletes documents). Then retry.
   ```
3. **Reduce index memory overhead by using fewer fields or smaller text fields in FT.CREATE (e.g., WITHSUFFIXTRIE off).** (70% success)
   ```
   Reduce index memory overhead by using fewer fields or smaller text fields in FT.CREATE (e.g., WITHSUFFIXTRIE off).
   ```

## Dead Ends

- **** — Setting maxmemory-policy to noeviction prevents eviction but also blocks new writes including index creation; it doesn't free memory. (70% fail)
- **** — Deleting the index key with DEL may not free memory immediately if the index is still referenced by internal structures; use FT.DROPINDEX instead. (60% fail)
