504 and 508 errors both mean your site timed out, but for different reasons. On GoZen Host, the 508 is especially important because it comes from CloudLinux resource limits.

508 Resource Limit Reached

This is a CloudLinux-specific error. It means your account hit one of its resource limits: CPU, memory, entry processes (concurrent PHP workers), or I/O.

Why It Happens

  • Traffic spike (legitimate or bot-driven)
  • Heavy plugin running a background task (WooCommerce cron, sitemap generation, backup)
  • No page caching, so every visitor triggers a full PHP execution
  • Multiple cron jobs running simultaneously
  • A bot hammering your site (check access logs)

Quick Fix

  1. Go to cPanel > Metrics > Resource Usage
  2. Check which resource has faults (red bar):
    • CPU - your PHP scripts are too demanding
    • PMEM - your processes need more RAM
    • EP (Entry Processes) - too many concurrent PHP requests
    • IO - too much disk activity

Long-Term Fixes

Enable caching (biggest impact):

LiteSpeed Cache serves pages without running PHP. A cached page uses zero entry processes, zero CPU, and negligible I/O.

Block bad bots:

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

Reduce WordPress heartbeat:

Add to wp-config.php:

  define('DISABLE_WP_CRON', true);
  

Then set up a real cron job in cPanel (Cron Jobs > run wp-cron.php every 15 minutes) instead of letting WordPress run it on every page load.

Optimize plugins: deactivate plugins you don’t actively use. Check CloudLinux Resource Limits for the full optimization guide.

Upgrade your plan: if you’ve optimized and still hit limits, you’ve outgrown your current plan. See Outgrown Shared Hosting?

504 Gateway Timeout

A 504 means the web server waited too long for PHP to respond and gave up. The PHP process is either still running (slow) or crashed.

Common Causes

  • A PHP script takes longer than the server timeout (usually 60-120 seconds)
  • A large database query that takes too long
  • An external API call that hangs (payment gateways, shipping calculators)
  • Plugin doing a heavy import/export operation

Fixes

Increase PHP timeout (temporary, for one-off tasks):

  1. Go to cPanel > Select PHP Version > Options
  2. Set max_execution_time to 300 (5 minutes)
  3. Set it back to 60 or 120 after your task completes

Optimize slow queries:

Install the Query Monitor plugin to find which database queries are taking too long. Look for queries that take more than 1 second.

Check external API calls:

If the timeout only happens on specific pages (checkout, shipping calculation), the page is probably waiting on an external API. Check if the third-party service is down.

WooCommerce-specific:

If 504 errors happen during WooCommerce order processing:

  1. Go to WooCommerce > Status > Scheduled Actions
  2. Clear pending actions if there’s a massive backlog
  3. Check if Action Scheduler is running properly

508 vs 504: How to Tell

ErrorCauseWhere to Look
508CloudLinux resource limit hitcPanel > Resource Usage
504PHP script timeoutError logs (~/public_html/error_log)

If you see both, the 508 is likely the root cause. CloudLinux is killing your PHP processes because they exceeded resource limits, which the web server then reports as a timeout.

What to Do Next

Last updated 07 Apr 2026, 00:00 +0200. history

Was this page helpful?