Skip to content

HTTP 5xx response

Your server is replying, but it's telling you something went wrong on its end. DomainDash shows the site as Down because a 5xx response means visitors can't use the site.

Symptom

  • DomainDash marks the uptime check as Down with error code http_5xx
  • Running curl -v https://example.com returns a 5xx status code (500, 502, 503, 504, 530, etc.)
  • Visitors see a generic error page — "500 Internal Server Error", "502 Bad Gateway", "503 Service Unavailable", or a provider-specific error page (e.g. Cloudflare's error pages)
  • Unlike a connection failure, the server is responding — it's just responding with an error

What it means

A 5xx response code means the server itself is broken, overwhelmed, or has encountered an error it can't recover from. Unlike 4xx errors (which mean the request was rejected), a 5xx means something is wrong in your infrastructure — the application, the process, an upstream service, or the server itself.

Each code points to a different layer:

CodeWhat it usually means
500 Internal Server ErrorApplication crashed — an unhandled exception, a missing environment variable, a misconfigured framework
502 Bad GatewayReverse proxy (Nginx, Caddy) reached the app layer but got a bad response — the app is likely down or stuck
503 Service UnavailableService is intentionally or accidentally unavailable — maintenance mode, auto-scaling lag, or the app refusing requests
504 Gateway TimeoutReverse proxy timed out waiting for the app to respond — similar to 502 but caused by slowness, not an outright failure
530 (Cloudflare)Cloudflare can't reach your origin server — the server is down or blocking Cloudflare's IPs

Common causes

  • Application threw an unhandled exception (500) — often triggered by a bad deploy, a missing environment variable, or a misconfigured dependency
  • The application server process is stopped or crashed (502, 503)
  • A database connection is down or a critical upstream API is unavailable, causing every dependent request to fail
  • The server is in maintenance mode (503) — intentional, but DomainDash will still flag it as Down
  • Auto-scaling hasn't kept up with a sudden traffic spike and the remaining instances are overwhelmed (503, 504)
  • A recent deploy introduced a regression that causes the app to crash on startup

How to fix

  1. Identify the exact status code. Run:

    bash
    curl -v https://example.com

    Note the status code and the response body — some frameworks include the exception type in the response even when showing an error page.

  2. Check your application logs. SSH into the server and look for errors around the time the incident started:

    bash
    sudo tail -200 /var/log/nginx/error.log

    For application-level logs:

    bash
    # Laravel
    tail -100 /path/to/app/storage/logs/laravel.log
    
    # Node.js (pm2)
    pm2 logs --lines 100
    
    # systemd service
    journalctl -u your-app-service -n 100

    Look for stack traces, exception names, and any pattern that correlates with the start of the downtime.

  3. Check for a recent deploy. Open DomainDash's uptime history for the site and look at when the Down status started. If it correlates with a deploy timestamp, a rollback is often the fastest fix:

    bash
    git revert HEAD
    # or deploy the previous release tag via your CI/CD pipeline
  4. Check upstream services. For 502 and 504, the app server is unreachable or unresponsive. Verify the process is running:

    bash
    sudo systemctl status php-fpm
    # or
    pm2 status

    Test database connectivity directly:

    bash
    psql -h <database-host> -U <user> -d <database>

    A database that's down, unreachable, or exhausted its connection pool is one of the most common causes of sudden 500/502 errors.

  5. Restart the application and verify. Restart the affected process:

    bash
    sudo systemctl restart php-fpm
    # or
    sudo systemctl restart your-app

    Then confirm the 5xx is gone:

    bash
    curl -v https://example.com

How to verify

After fixing:

  1. Run curl -v https://example.com — the response should start with HTTP/2 200.
  2. Open the site in a fresh browser window — it should load without an error page.
  3. In DomainDash, go to the site's uptime tab and click "Check now". Status should flip from Down to Healthy.

Monitor your websites for free

DomainDash checks your uptime, SSL, DNS, and domain registration so you don't have to. Set up in under a minute.