Title: &#8220;OOM command not allowed when used memory &gt; &#8216;maxmemory&#8217;.&#8221;
Last modified: November 4, 2021

---

# “OOM command not allowed when used memory > ‘maxmemory’.”

 *  Resolved [johnsyin97](https://wordpress.org/support/users/johnsyin97/)
 * (@johnsyin97)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/oom-command-not-allowed-when-used-memory-maxmemory/)
 * Hi I am using free redis instance in heroku, has previously connecting to it 
   without issue, when check on it today I see that it is not connected with this
   error. Following is copied from diagnostics tab:
 *     ```
       Status: Not connected
       Client: Predis (v1.1.8)
       Drop-in: Valid
       Disabled: No
       Ping: PONG
       Errors: [
           "OOM command not allowed when used memory > 'maxmemory'."
       ]
       PhpRedis: Not loaded
       Predis: 1.1.8
       Credis: Not loaded
       PHP Version: 7.4.25
       Plugin Version: 2.0.21
       Redis Version: 6.2.3
       Multisite: No
       Metrics: Disabled
       Metrics recorded: null
       Filesystem: Could not initialize filesystem.
       Global Prefix: "wp_"
       Blog Prefix: "wp_"
       WP_REDIS_DISABLED: false
       WP_REDIS_CLIENT: "predis"
       WP_REDIS_SCHEME: "redis"
       WP_REDIS_HOST: "<blablabla>.compute-1.amazonaws.com"
       WP_REDIS_PORT: 21029
       WP_REDIS_MAXTTL: 2419200
       WP_REDIS_PASSWORD: ••••••••
       Global Groups: [
           "blog-details",
           "blog-id-cache",
           "blog-lookup",
           "global-posts",
           "networks",
           "rss",
           "sites",
           "site-details",
           "site-lookup",
           "site-options",
           "site-transient",
           "users",
           "useremail",
           "userlogins",
           "usermeta",
           "user_meta",
           "userslugs",
           "redis-cache",
           "blog_meta"
       ]
       Ignored Groups: [
           "counts",
           "plugins",
           "themes",
           "blog-details",
           "blog-id-cache",
           "blog-lookup",
           "global-posts",
           "networks",
           "rss",
           "sites",
           "site-details",
           "site-lookup",
           "site-options",
           "site-transient",
           "users",
           "useremail",
           "userlogins",
           "usermeta",
           "user_meta",
           "userslugs",
           "redis-cache",
           "blog_meta"
       ]
       Unflushable Groups: []
       Drop-ins: [
           "Redis Object Cache Drop-In v2.0.21 by Till Krüss"
       ]
       ```
   
    -  This topic was modified 4 years, 7 months ago by [johnsyin97](https://wordpress.org/support/users/johnsyin97/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/oom-command-not-allowed-when-used-memory-maxmemory/#post-15037625)
 * You’re running out of Redis Memory. I’d strongly suggest setting a `WP_REDIS_MAXTTL`
   as well as an eviction policy:
 * [https://devcenter.heroku.com/articles/heroku-redis#maxmemory-policy](https://devcenter.heroku.com/articles/heroku-redis#maxmemory-policy)
 *  [The Old Man](https://wordpress.org/support/users/graham-smith/)
 * (@graham-smith)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/oom-command-not-allowed-when-used-memory-maxmemory/#post-15115618)
 * Hi,
 * Just wanted to say thanks for this topic and the advice.
 * Although I don’t use Heroku as per the OP, I do use and recommend the free version
   of this plugin.
 * I’ve just spent 2.5 hours trying to log into my WordPress site, successfully 
   resetting the pw, etc, only still to find I was unable to log in, either the 
   normal site or the Admin Dashboard. There were no errors displayed, no clue anything
   was up.
 * Then it occurred to me to look at the error log for the site (d’oh), and it was
   full of errors reporting:
 * `AH01071: Got error 'PHP message: RedisException: OOM command not allowed when
   used memory > 'maxmemory'. in /home/mysite/public_html/dev/wp-content/object-
   cache.php`
 * I came here and found this topic. I found my Redis pool memory was full. I added
   the WP Redis TTL Config constant but it didn’t start to flush keys (older than
   a week).
 * Then it dawned on me. A few months back I’d upgraded to Redis 6 and in setting
   it up, when I checked, I’d selected a Volatile-LFU policy, then forgot all about
   it. So it was only expiring keys with a volatile TTL, which it seems are er, 
   none.
 * After changing the redis.conf to maxmemory-policy allkeys-lru, restarting Redis,
   immediately Redis started flushing keys.
 * Guess, what? I immediately was able to log in to my site!
 * So hopefully this may help someone else who has exhausted all the usual reasons
   and causes.
 * Thanks to [@tillkruess](https://wordpress.org/support/users/tillkruess/) and 
   [@johnsyin97](https://wordpress.org/support/users/johnsyin97/) for the push in
   the right direction!
    -  This reply was modified 4 years, 6 months ago by [The Old Man](https://wordpress.org/support/users/graham-smith/).
 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/oom-command-not-allowed-when-used-memory-maxmemory/#post-15115871)
 * Happy to hear it worked out! 🥰

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘“OOM command not allowed when used memory > ‘maxmemory’.”’ is closed 
to new replies.

 * ![](https://ps.w.org/redis-cache/assets/icon-256x256.gif?rev=2568513)
 * [Redis Object Cache](https://wordpress.org/plugins/redis-cache/)
 * [Support Threads](https://wordpress.org/support/plugin/redis-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/redis-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redis-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redis-cache/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/oom-command-not-allowed-when-used-memory-maxmemory/#post-15115871)
 * Status: resolved