UnderHost
Knowledgebase Docs

Fixing a 503 Service Unavailable error

503 error means the server is temporarily unavailable. Diagnose maintenance mode, overload, or service failures.

On this page

HTTP 503 Service Unavailable means the web server received your request but cannot respond right now. Unlike a 500 error (server crash), a 503 is usually temporary—your site will recover shortly. Common causes include server overload, maintenance mode, database connection failures, or a service temporarily down for updates.

Common causes

  • Scheduled maintenance - UnderHost or your hosting provider is performing updates (usually brief)
  • Server overload - Too many visitors at once, exceeding server capacity
  • Web server crashed - Nginx or Apache process crashed or became unresponsive
  • Database server down - MySQL/MariaDB is offline or unreachable
  • All worker processes busy - Every available worker is handling requests; new requests queue up
  • Plugin or theme issue - WordPress plugin causing fatal errors, triggering maintenance mode
  • PHP-FPM crashed - The FastCGI Process Manager handling PHP requests is down
  • Memory exhausted - Server ran out of RAM, killing essential services
  • File system full - Disk is 100% full, preventing writes and processes
  • CloudFlare or reverse proxy blocking - Intermediate proxy returned 503 instead of actual server

Is your 503 temporary or persistent?

  • Temporary (expected): 503 appears for 5-30 minutes then resolves. Likely maintenance or brief overload.
  • Persistent (needs action): 503 continues for 30+ minutes. Requires investigation and possible restart.

What do visitors see?

  • Browser: "503 Service Unavailable" or "Server Temporarily Unavailable"
  • Message: "Service Unavailable - The server is temporarily unable to service your request..."
  • Some servers show a custom maintenance page instead of raw 503
  • All visitors see the same error—it's not page-specific

If you're on shared hosting (recommended first step)

Shared hosting users cannot restart services. If your site is showing 503:

  1. Wait 15-30 minutes - Temporary 503 errors often resolve on their own
  2. Clear your browser cache - Ctrl+Shift+Delete, clear cache and cookies
  3. Try from another device or network - If only your computer sees the error, it's likely a local cache issue
  4. Check UnderHost status page - Visit underhost.com status to see if there's scheduled maintenance
  5. If 503 persists after 1 hour: Open a support ticket with your domain name and the error message
Shared hosting note

SSH access and service restart commands are NOT available on shared hosting. Contact UnderHost support if a 503 persists. On Cloud VPS or Dedicated Servers, you can use the commands below.

If you're on Cloud VPS or Dedicated Server

Step 1: Check what's running

Connect via SSH and check if web server and database are running:

# Check Nginx status
sudo systemctl status nginx

# Check Apache status (if using Apache instead)
sudo systemctl status apache2

# Check MySQL/MariaDB status
sudo systemctl status mysql
sudo systemctl status mariadb

# Check PHP-FPM status (if using PHP)
sudo systemctl status php-fpm
sudo systemctl status php8.1-fpm  # (version may vary)

Step 2: Restart services (if stopped or unresponsive)

# Restart Nginx
sudo systemctl restart nginx

# Restart Apache
sudo systemctl restart apache2

# Restart MySQL/MariaDB
sudo systemctl restart mysql
sudo systemctl restart mariadb

# Restart PHP-FPM
sudo systemctl restart php-fpm
sudo systemctl restart php8.1-fpm

Step 3: Check system resources

High resource usage can cause 503 errors:

# Check CPU and memory usage
top

# Press 'q' to exit, then check disk space
df -h

# Check if disk is full (100%)
du -sh /home/*

# Check memory
free -h

Step 4: Check error logs

Look for clues about what failed:

# Nginx error log
sudo tail -50 /var/log/nginx/error.log

# Apache error log
sudo tail -50 /var/log/apache2/error.log

# MySQL error log
sudo tail -50 /var/log/mysql/error.log

# System messages
sudo tail -50 /var/log/syslog

WordPress-specific: Check for infinite loops or fatal errors

If you're running WordPress:

  1. Check if WordPress is in maintenance mode:
    • Connect via FTP or File Manager
    • Look for a file named .maintenance in your public_html directory
    • If it exists, delete it (it's left behind after failed plugin/theme updates)
  2. Disable all plugins:
    • Via FTP: Rename /wp-content/plugins/ to /wp-content/plugins-old
    • Try to access your site
    • If it works, a plugin caused the 503
    • Rename the folder back and disable plugins one by one to find the culprit
  3. Check PHP memory limit:
    • Add this to wp-config.php: define('WP_MEMORY_LIMIT', '256M');
    • This increases available memory for WordPress
  4. Enable WordPress debug logging:
    • Edit wp-config.php and add:
    • define('WP_DEBUG', true);
    • define('WP_DEBUG_LOG', true);
    • Check /wp-content/debug.log for error details

Your site is getting too much traffic

If 503 errors appear when traffic spikes (e.g., after sharing on social media):

  • Enable caching: Install a caching plugin like WP Super Cache or W3 Total Cache to reduce server load
  • Optimize images: Large images consume server resources; compress them before uploading
  • Use a CDN: CloudFlare (free) caches static content near visitors, reducing requests to your server
  • Upgrade your plan: If you're consistently seeing 503 during normal traffic, your shared hosting plan may be too small. Consider Cloud VPS for more resources
  • Implement rate limiting: Block excessive requests from the same IP

503 Error troubleshooting checklist

  • ☐ Wait 15-30 minutes (if new)
  • ☐ Clear browser cache (Ctrl+Shift+Delete)
  • ☐ Try from a different device or network
  • ☐ Check UnderHost status page for maintenance notices
  • ☐ (VPS only) Check if web server is running: systemctl status nginx
  • ☐ (VPS only) Restart web server: systemctl restart nginx
  • ☐ (VPS only) Check system resources: top, df -h, free -h
  • ☐ (VPS only) Check error logs for specific errors
  • ☐ (WordPress) Delete .maintenance file if it exists
  • ☐ (WordPress) Disable plugins and test
  • ☐ (If traffic spike) Enable caching and use CDN
  • ☐ (Persistent) Open support ticket with exact error and when it started

When to contact UnderHost support

Open a support ticket if:

  • You're on shared hosting and 503 persists after 1 hour
  • You're on VPS and restarting services didn't help
  • Logs show database connection errors you can't resolve
  • You see "out of memory" or disk full errors
  • The error started after you made a change

In your ticket, include: your domain name, when the 503 started, whether it's constant or intermittent, and any changes you made recently.

503 vs other errors

502 Bad Gateway: Server received no response (deeper issue)
504 Gateway Timeout: Server took too long to respond
503 Service Unavailable: Server is reachable but temporarily can't serve (usually temporary)

Related: Fixing a 502 Bad Gateway error | Fixing a 504 Gateway Timeout error | My website is down-what to check first

Was this article helpful?

Still troubleshooting?

Use UnderHost tools for quick checks, or open a support ticket when the issue needs account or server access.

Related articles

Back to Troubleshooting