# Fix the Redis "OOM command not allowed" error
Source: https://docs.webgee.com/en/performance/redis-limits-php-fatal-error-uncaught-redisexception-oom-command-not-allowed-whe



Your site returns:

```
PHP Fatal error: Uncaught RedisException: OOM command not allowed
when used memory > 'maxmemory'
```

Applies to shared and reseller hosting using Redis object caching.

Redis has run out of the memory allocated to it and is refusing new writes.

## Why this is separate from your plan's memory [#why-this-is-separate-from-your-plans-memory]

This catches people out: the Redis memory limit is **not** your account's memory
limit.

|                       | Applies to               | Default          |
| --------------------- | ------------------------ | ---------------- |
| **LVE memory (PMEM)** | Your account's processes | Set by your plan |
| **Redis `maxmemory`** | The Redis cache only     | **32 MB**        |

You can have plenty of account memory free and still hit the Redis ceiling. They
are unrelated numbers.

## Fix it now [#fix-it-now]

Restart Redis to clear the cache. In cPanel, open **Redis**, disable it, then
enable it again.

Cached data is regenerated on demand, so nothing is lost — the first few requests
afterwards are slower while the cache refills.

## Stop it recurring [#stop-it-recurring]

Clearing the cache is temporary. 32 MB is filling for a reason:

**Reduce what is cached.** In LiteSpeed Cache, under **Cache → Object**, review
**Do Not Cache Groups**. Session data and cart contents on a busy store fill
Redis quickly and benefit least from being there.

**Lower the object lifetime.** The default TTL is 360 seconds. Shortening it
means entries expire before the cache fills.

**Check for a caching loop.** A plugin writing a unique key per request — a
timestamp or session ID in the key — fills any cache regardless of size. If Redis
fills within minutes of clearing, this is why.

**Ask for more.** If the site genuinely needs a larger cache, open a ticket with
your [support PIN](/en/account-billing/support-pin). The limit is set
server-side, so you cannot raise it yourself.

## Check it worked [#check-it-worked]

In WordPress, **LiteSpeed Cache → Cache → Object** shows the connection status
and current memory use. Watch it after clearing: filling steadily over hours is
normal, filling within minutes is a caching loop.

## Related [#related]

* [Enable Redis object caching](/en/performance/redis-object-caching-lscache)
* [Which object cache should I use?](/en/performance/memcached-vs-redis-which-is-best-for-my-website)
