Skip to content
super-page-cache

Instant speed boost – enable lazy-loading, defer scripts, and fine-tune caching for blazing-fast pages. Priority support included.

See Pro Plans →

Troubleshooting High Memory Usage in Super Page Cache

If your server is running out of memory or crashing after enabling Super Page Cache, certain resource-intensive features are likely the cause. This guide explains what triggers memory exhaustion, how to fix it quickly, and how to configure the plugin to stay within your server's limits.

Identify the Issue

Before making any changes, confirm that Super Page Cache is the source of the problem.

Signs of memory exhaustion

  • PHP fatal errors in your server logs containing messages like Allowed memory size of X bytes exhausted.
  • The WordPress admin dashboard becomes unresponsive or returns a white screen, especially after cache-related operations.
  • Your hosting control panel shows a sharp spike in memory or CPU usage correlated with cache purges or preload runs.
  • The site crashes intermittently during low-traffic periods when background tasks (such as preloading) are active.

Check your server logs

  1. Log in to your hosting control panel and open the PHP error log or server error log.
  2. Look for entries containing Allowed memory size exhausted or Out of memory.
  3. Note the timestamp of each error and cross-reference it with when the plugin's background tasks run.

Check whether the plugin is the source

  1. In the WordPress admin, go to Settings > Super Page Cache and open the General tab.
  2. Enable Show Advanced Settings and click Save Settings.
  3. Open the Advanced tab, scroll to the Logs Settings section, and enable Log Mode.
  4. Click Save Settings.
  5. Trigger a cache purge or let the site run for a few minutes.
  6. Download the log file (a link appears in the Logs Settings section once logging is active) and look for heavy activity such as preloader runs starting immediately after purge events.

⚠️ Important: Log Mode itself adds overhead. Disable it again once you have gathered the information you need. See Disable Log Mode below.

Common Causes

1. Cache Preloader running at full speed

The Cache Preloader visits every URL on your site in the background to warm the cache. When it runs unconstrained — especially if triggered automatically after every purge — it can simultaneously crawl hundreds of pages, exhausting available PHP memory within seconds.

Specific settings that amplify this:

  • Automatically Preload Pages You Have Purged From Cache is enabled, causing a full crawl after every purge event.
  • Large sitemaps are included under Preload All URLs Into the Following Sitemaps, meaning the preloader tries to visit thousands of URLs in a single run.
  • SWCFPC_PRELOADER_MAX_POST_NUMBER is left at its default of 50, which may still be too high for servers with limited RAM.

2. Log Mode left enabled in production

Log Mode records detailed activity for every cache event. On a busy site, the plugin writes continuously to the log file, consuming memory proportional to the volume of traffic and cache activity. On low-memory servers, this overhead alone can trigger fatal errors.

3. Conflicts with other optimization plugins

Running Super Page Cache alongside other plugins that also perform full-cache purges or page crawls (for example, other caching plugins, SEO crawlers, or backup plugins) doubles the background load. This is especially likely if the third-party plugin triggers its operations at the same time as the preloader.

Quick Fixes

Apply the following changes in order. After each change, monitor your server memory to see whether the situation improves before proceeding to the next step.

1. Disable the Cache Preloader

  1. Go to Settings > Super Page Cache and open the Advanced tab.
  2. Scroll to the Preloader section.
  3. Disable Enable Preloader to turn off all preloading immediately.
  4. Click Save Settings.

📝 Note: Disabling the preloader stops background crawling entirely. Your pages will still be cached normally — the first real visitor to each page will trigger caching as usual. The preloader only "warms" the cache proactively before visitors arrive. You can re-enable it later with the constraints described in the Prevention section.

If you want to keep the preloader active but reduce its impact, disable automatic triggering instead:

  1. In the Preloader section, disable Automatically Preload Pages You Have Purged From Cache.
  2. Click Save Settings.

This means the preloader will no longer start automatically after a cache purge. You can still run it manually when traffic is low.

2. Disable Log Mode

  1. Go to Settings > Super Page Cache and open the Advanced tab.
  2. Scroll to the Logs Settings section.
  3. Disable Log Mode.
  4. Click Save Settings.

Disabling logging removes the continuous write overhead and frees up memory that the log buffer was consuming.

3. Check for conflicting plugins

  1. Temporarily deactivate other caching or optimization plugins (such as W3 Total Cache, WP Super Cache, or LiteSpeed Cache) one at a time.
  2. After each deactivation, monitor server memory to see whether the problem resolves.
  3. If a specific plugin is the cause, keep it deactivated or configure it so that it does not trigger full-cache operations at the same time as Super Page Cache.

Prevention

Once your server is stable, use these settings to keep memory usage under control long-term.

Limit the number of pages preloaded per run

Add the following line to your wp-config.php file to override the default batch size of 50 pages:

php
define( 'SWCFPC_PRELOADER_MAX_POST_NUMBER', 20 );

Lower values reduce the peak memory used during each preload batch. Start with 20 and adjust upward only if your server handles it comfortably.

💡 Tip: There is no single correct value — it depends on your server's available PHP memory and the average size of your pages. Test with a low number first and increase gradually.

Schedule preloading during off-peak hours

Instead of letting the preloader run automatically after every purge, trigger it on a schedule when traffic is low (for example, overnight):

  1. Go to Settings > Super Page Cache > Advanced > Preloader and copy the URL shown under Start the Preloader via Cronjob.
  2. Add that URL as an external cron job in your hosting control panel, scheduled for off-peak hours.
  3. Disable Automatically Preload Pages You Have Purged From Cache so the preloader does not also run during peak hours.

See How to Automate Cache Purging and Preloading with Super Page Cache for detailed cron setup instructions.

Narrow the preloader scope

Reduce the number of URLs the preloader visits by limiting the sitemaps and page types it processes:

  1. Go to Settings > Super Page Cache > Advanced > Preloader.
  2. Under Preloader Operation, select only high-priority page types (for example, your most recently published posts) rather than every available option.
  3. Under Preload All URLs Into the Following Sitemaps, remove large sitemaps and keep only essential ones.
  4. Click Save Settings.

Keep Log Mode off in production

Enable Log Mode only when actively debugging a specific problem, then disable it immediately afterwards. Continuous logging on a busy site is a consistent source of avoidable memory overhead.

Verification

After applying the changes above, confirm that the memory issue is resolved:

  1. Monitor your server's PHP error log for 24–48 hours and confirm that Allowed memory size exhausted errors no longer appear.
  2. Check your hosting control panel's memory usage graph and verify that peak memory consumption has dropped to an acceptable level.
  3. If you use a monitoring tool such as New Relic or Query Monitor, confirm that background cache processes are no longer generating spikes.
  4. Edit a post and confirm that the updated content is visible to visitors, so you know caching is still working correctly after the changes.

Troubleshooting

Memory errors continue after disabling the preloader and log mode

  • Verify that the settings were saved by revisiting Settings > Super Page Cache > Advanced and confirming both Enable Preloader and Log Mode are off.
  • Check whether another plugin is causing the memory spikes independently of Super Page Cache. Temporarily deactivate all non-essential plugins and re-enable them one at a time.
  • Review your PHP memory_limit setting. On very low-memory plans (for example, 64 MB or below), even basic WordPress operations can fail. Contact your hosting provider to increase the limit, or consider upgrading your hosting plan.

Pages are no longer being cached after disabling the preloader

The preloader is not required for caching to work. Pages are still cached when first visited by a real user. If caching itself has stopped, the issue is unrelated to the preloader. See Error when testing cache for guidance on diagnosing caching failures.

The preloader keeps restarting on its own

If Enable Preloader is disabled but the preloader still appears to run, check whether an external cron job (set up previously via Start the Preloader via Cronjob) is still triggering it. Remove or disable that cron job in your hosting control panel.