# ERR PEL too large for consumer group 'mygroup' on stream 'mystream': 50000 entries, consider trimming

- **ID:** `redis/stream-pending-entry-list-too-large`
- **Domain:** redis
- **Category:** resource_error
- **Error Code:** `ERR`
- **Verification:** ai_generated
- **Fix Rate:** 79%

## Root Cause

The pending entries list (PEL) for a consumer group has grown excessively large, consuming memory and slowing down XREADGROUP and XACK operations.

## Version Compatibility

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

## Workarounds

1. **Use XAUTOCLAIM to reclaim and acknowledge old pending entries: 'XAUTOCLAIM mystream mygroup myconsumer 3600000 0-0 COUNT 1000' then XACK each claimed entry. Repeat until PEL is reduced.** (85% success)
   ```
   Use XAUTOCLAIM to reclaim and acknowledge old pending entries: 'XAUTOCLAIM mystream mygroup myconsumer 3600000 0-0 COUNT 1000' then XACK each claimed entry. Repeat until PEL is reduced.
   ```
2. **Implement a periodic cleanup job in the consumer that checks PEL size via XINFO GROUPS and automatically trims old entries using XDEL after confirming they are no longer needed** (80% success)
   ```
   Implement a periodic cleanup job in the consumer that checks PEL size via XINFO GROUPS and automatically trims old entries using XDEL after confirming they are no longer needed
   ```

## Dead Ends

- **Increasing maxmemory to accommodate the large PEL** — This only delays the problem; the PEL will continue to grow until memory is exhausted again, and it does not improve performance. (80% fail)
- **Deleting the consumer group and recreating it** — This loses all pending entry state, potentially causing data loss if entries were not processed. (90% fail)
- **Setting a very high XREADGROUP COUNT to read more entries** — This increases load on the server and does not reduce the PEL size; it may actually grow it faster. (70% fail)
