Logo
Bearhost Logo

How to Fix "508 Resource Limit Reached"

By Elliot, BearHost·

The "508 Resource Limit Reached" error occurs on shared hosting when your website exceeds the allocated CPU, memory, or I/O limits enforced by CloudLinux LVE. This guide helps you identify the cause and fix it.

What Causes the 508 Error?

Shared hosting servers use CloudLinux to isolate accounts and prevent one site from affecting others. Each account gets limits for:

  • CPU — processing power
  • Physical Memory (PMEM) — RAM usage
  • I/O — disk read/write speed
  • Entry Processes (EP) — concurrent PHP processes
  • NPROC — total number of processes

When any limit is exceeded, the server returns a 508 error to your visitors.

Step 1: Check Resource Usage in cPanel

  1. Log in to cPanel
  2. Go to Metrics > Resource Usage
  3. Review the graphs for the past 24 hours
  4. Look for which resource is hitting its limit (shown in red)

| Resource | Limit | What Causes High Usage | |---|---|---| | CPU | Varies by plan | Heavy plugins, unoptimised code, bots | | PMEM | Varies by plan | Too many plugins, memory leaks, large imports | | I/O | Varies by plan | Database-heavy queries, large file operations | | EP | 20–30 typical | Many simultaneous visitors, slow PHP scripts | | NPROC | 100 typical | Runaway processes, cron jobs stacking |

Step 2: Identify the Culprits

Check Running Processes

In cPanel > Metrics > Resource Usage > Current Usage, see which scripts are consuming the most resources.

Check for Bot Traffic

Bots (search engine crawlers, scrapers, bad bots) can consume significant resources:

  1. Check cPanel > Metrics > Visitors or Raw Access logs
  2. Look for high-frequency requests from the same user agents
  3. Common resource-hungry bots: SemrushBot, AhrefsBot, BLEXBot, MJ12bot

Block bad bots in .htaccess:

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (SemrushBot|AhrefsBot|MJ12bot|BLEXBot) [NC]
RewriteRule .* - [F,L]

Check Error Logs

Go to cPanel > Metrics > Errors to find PHP errors, as repeated errors consume CPU cycles.

Step 3: Implement Caching

Caching is the single most effective fix for 508 errors. It serves pre-built pages instead of executing PHP on every visit.

LiteSpeed Cache (Recommended for BearHost)

BearHost shared hosting uses LiteSpeed, making this the best caching option:

  1. Install the LiteSpeed Cache plugin in WordPress
  2. Go to LiteSpeed Cache > General > enable the cache
  3. Go to LiteSpeed Cache > Cache and enable:
    • Cache Logged-in Users: OFF (unless needed)
    • Cache Mobile: ON
    • Drop Query String: ON
  4. Go to Page Optimization:
    • CSS Minify: ON
    • JS Minify: ON
    • HTML Minify: ON
  5. Purge all cache after configuring

WP Super Cache (Alternative)

  1. Install WP Super Cache
  2. Go to Settings > WP Super Cache
  3. Enable caching
  4. Select Expert mode for best performance

Step 4: Optimise the Database

Slow database queries are a top cause of high CPU and I/O:

-- Find slow queries by checking long-running processes
SHOW PROCESSLIST;

-- Optimise all tables
-- Run this in phpMyAdmin or WP-CLI

Install WP-Optimize to:

  • Remove post revisions
  • Clean expired transients
  • Optimise database tables
  • Schedule weekly cleanup

Step 5: WordPress-Specific Fixes

Disable wp-cron

WordPress wp-cron runs on every page load, wasting CPU:

Add to wp-config.php:

define( 'DISABLE_WP_CRON', true );

Set up a real cron job in cPanel (every 15 minutes):

*/15 * * * * /usr/local/bin/php /home/username/public_html/wp-cron.php > /dev/null 2>&1

Limit Post Revisions

Add to wp-config.php:

define( 'WP_POST_REVISIONS', 5 );
define( 'AUTOSAVE_INTERVAL', 120 );

Block XML-RPC

XML-RPC is frequently exploited and wastes CPU:

<Files xmlrpc.php>
Order Deny,Allow
Deny from all
</Files>

Disable WordPress Heartbeat

The WordPress Heartbeat API makes AJAX requests every 15 seconds in the admin:

Install Heartbeat Control and set it to:

  • Disable on frontend
  • Reduce frequency to 60 seconds in admin

Step 6: Reduce Plugin Overhead

  1. Go to Plugins > Installed Plugins
  2. Deactivate plugins you are not actively using
  3. Replace heavy plugins with lightweight alternatives:
    • Replace Jetpack with individual plugins for only the features you need
    • Replace heavy page builders with the Block Editor where possible
    • Use Query Monitor plugin to identify which plugins consume the most resources
  4. Delete deactivated plugins entirely (do not just deactivate)

When to Upgrade to VPS

If you have optimised everything and still hit limits regularly, it is time to upgrade:

  • Consistent 508 errors despite optimisation
  • More than 50,000 monthly visitors
  • WooCommerce store with high traffic
  • Multiple resource-heavy plugins required for your business
  • Need for custom server configuration

BearHost VPS plans start at $4.49/month and give you dedicated resources that are not shared with other users. Contact support for a seamless migration.

Tags:#508#resource-limit#shared-hosting#optimization#caching#cpanel#wordpress#performance