Title: PHP Fatal error: OOM command not allowed when used memory &gt; &#8216;maxmemory&#8217;
Last modified: January 28, 2019

---

# PHP Fatal error: OOM command not allowed when used memory > ‘maxmemory’

 *  Resolved [nico0012](https://wordpress.org/support/users/nico0012/)
 * (@nico0012)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-oom-command-not-allowed-when-used-memory-maxmemory/)
 * Hi, I start to use this plugin some weeks ago and I not have any problems at 
   the moment. But seems yesterday I start to get an error. I have to increase the
   reddis plan to avoid the problem at the moment. Note: I use Heroku as server 
   and Reddis as addon.
    …… PHP Fatal error: Uncaught Predis\Response\ServerException:
   OOM command not allowed when used memory > ‘maxmemory’. in ../wp-content/plugins/
   redis-cache/includes/predis/src/Client.php:370
 * #0 ../wp-content/plugins/redis-cache/includes/predis/src/Client.php(335): Predis\
   Client->onErrorResponse(Object(Predis\Command\StringSet), Object(Predis\Response\
   Error))
    ……
 * I only need to use this plugin to handle the user login process to access to 
   the backend of wordpress. I don want to ‘cache’ any other section.
 * So I set this configuration:
 * define(‘WP_REDIS_IGNORED_GROUPS’, array(‘comment’, ‘blog-details’, ‘blog-id-cache’,‘
   blog-lookup’, ‘global-posts’, ‘networks’, ‘rss’, ‘sites’, ‘site-details’, ‘site-
   lookup’, ‘site-options’, ‘site-transient’, ‘users’, ‘useremail’, ‘usermeta’, ‘
   user_meta’, ‘userslugs’) );
 * My question is this plugin delete the old keys records after some time? There
   is a way to set the time?
    Any advice about how to avoid this problem? Thanks.

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

 *  [Adam Harris w/THarris Consultants](https://wordpress.org/support/users/tharrisconsultants/)
 * (@tharrisconsultants)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-oom-command-not-allowed-when-used-memory-maxmemory/#post-11149285)
 * I’m running into this same error. I’m not sure what may have occurred over the
   past few days that would have caused this issue.
 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-oom-command-not-allowed-when-used-memory-maxmemory/#post-11149352)
 * Your Redia database is running out of memory. Either flush it, or upgrade the
   memory or set a MAX_TTL to avoid this issue.
 *  Thread Starter [nico0012](https://wordpress.org/support/users/nico0012/)
 * (@nico0012)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-oom-command-not-allowed-when-used-memory-maxmemory/#post-11149800)
 * Hi, thanks for the help. When I get this error all WordPress pages give me this
   error. so I can not access to the backend to flush the database. The solution
   was increase the Redis plan, since from Heroku Redis Addon is not posible to 
   make flush the data in fast way.
    My error was not set the MAX_TTL, I forget 
   set this in wp-config.php. Following some documentation: I set now to 900 and
   now seems all works good and Redis keeps using low amount of data stored.
 * By the way, maybe for future changes in this plugin, can we catch this error 
   in some way to avoid push down the hold site?
    Thanks.
 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-oom-command-not-allowed-when-used-memory-maxmemory/#post-11150095)
 * I’d be open to a Pull Request on GitHub yeah.
 * You can use the WP CLI commands to flush the cache.
 *  Thread Starter [nico0012](https://wordpress.org/support/users/nico0012/)
 * (@nico0012)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-oom-command-not-allowed-when-used-memory-maxmemory/#post-11150154)
 * Thanks! 🙂

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

The topic ‘PHP Fatal error: 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/)

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)

 * 5 replies
 * 3 participants
 * Last reply from: [nico0012](https://wordpress.org/support/users/nico0012/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-oom-command-not-allowed-when-used-memory-maxmemory/#post-11150154)
 * Status: resolved