Title: Memory Limit Error
Last modified: November 29, 2018

---

# Memory Limit Error

 *  Resolved [Marion Dorsett](https://wordpress.org/support/users/mariondorsett/)
 * (@mariondorsett)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/memory-limit-error-4/)
 * When this plugin v5.6 is activated it’s throwing a 500 error on the site.
 * No error_log was generated because the error is throwing a fatal memory error.
 * I reverted the plugin to 5.5.2 and no issues with that version of the plugin.

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

 *  [rpodsada](https://wordpress.org/support/users/rpodsada/)
 * (@rpodsada)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/memory-limit-error-4/#post-10877608)
 * Update: Found a fix for this with 5.6: Go into Settings and Clear Cache. The 
   error seems to be some kind of memory runaway with the cache after the upgrade.
   Maybe the upgrade process should clear the cache automatically on each upgrade?
 *  Plugin Author [AAM Plugin](https://wordpress.org/support/users/vasyltech/)
 * (@vasyltech)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/memory-limit-error-4/#post-10877788)
 * Hi guys,
 * Yup, [@rpodsada](https://wordpress.org/support/users/rpodsada/) is correct. That
   is one of the way to possibly resolve this issue. Check this thread [https://wordpress.org/support/topic/white-screen-of-death-on-page-load/](https://wordpress.org/support/topic/white-screen-of-death-on-page-load/).
 * Honestly I would love to find the real root cause for this issue, however it 
   occur in rare occasions and seams like clearing cache actually helps.
 * Currently I do not want to overload you guys with technical details on what I
   was able to find by troubleshooting some of the websites that I had access to,
   however just want to let you know that I keep my eyes open so please contact 
   me if anything.
 * Regards,
    Vasyl
 *  [rpodsada](https://wordpress.org/support/users/rpodsada/)
 * (@rpodsada)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/memory-limit-error-4/#post-10885656)
 * [**@vasyltek**](https://wordpress.org/support/users/vasyltech/), is there a way
   to clear the cache from the command-line? Either with wp-cli, PHP, or some other
   scriptable method?
    -  This reply was modified 7 years, 6 months ago by [rpodsada](https://wordpress.org/support/users/rpodsada/).
    -  This reply was modified 7 years, 6 months ago by [rpodsada](https://wordpress.org/support/users/rpodsada/).
 *  Plugin Author [AAM Plugin](https://wordpress.org/support/users/vasyltech/)
 * (@vasyltech)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/memory-limit-error-4/#post-10886169)
 * Hi [@rpodsada](https://wordpress.org/support/users/rpodsada/),
 * You can do that programmatically by calling `AAM_Core_API::clearCache()`.
 * That should clear all the cache.
 * Regards,
    Vasyl
 *  [mvaneijgen](https://wordpress.org/support/users/mvaneijgen/)
 * (@mvaneijgen)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/memory-limit-error-4/#post-10898210)
 * [@vasyltech](https://wordpress.org/support/users/vasyltech/) could you elaborate
   from where do I need to call `AAM_Core_API::clearCache()`?
 * I get the following errors
 * `Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate
   294912 bytes) in /wp-content/plugins/advanced-access-manager/Application/Core/
   Object/Cache.php on line 75`
 * `Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate
   294912 bytes) in /wp-includes/formatting.php on line 4331`
 *  [rpodsada](https://wordpress.org/support/users/rpodsada/)
 * (@rpodsada)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/memory-limit-error-4/#post-10900073)
 * [@mvaneijgen](https://wordpress.org/support/users/mvaneijgen/) You can run this
   using [wp-cli](https://wp-cli.org/). The eval command it lets you execute PHP
   code. e.g. Run this from the command line of the root WordPress install folder:
 * `wp-cli eval 'AAM_Core_API::clearCache();'`
 * The PHP code would also work from any script that has wp-load.php loaded as well,
   so any file inside of your theme, or your own script which includes wp-load before
   running this code.
 * That being said, it’s probably not a good idea to put it into functions.php or
   another theme file, though. Even though it would run, it would clear the cache
   on each page load, slowing down your site and eliminating any benefits the AAM
   cache would provide.

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

The topic ‘Memory Limit Error’ is closed to new replies.

 * ![](https://ps.w.org/advanced-access-manager/assets/icon-256x256.png?rev=3447421)
 * [Advanced Access Manager – Access Governance for WordPress](https://wordpress.org/plugins/advanced-access-manager/)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-access-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-access-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-access-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-access-manager/reviews/)

 * 6 replies
 * 4 participants
 * Last reply from: [rpodsada](https://wordpress.org/support/users/rpodsada/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/memory-limit-error-4/#post-10900073)
 * Status: resolved