Skip to content

Laravel's built-in /up health route coexists with the custom /health endpoint and always returns 200 regardless of real service health #158

Description

@morcen

What: bootstrap/app.php still wires up Laravel's built-in health-check convention at /up, alongside the app's own deep /health endpoint. /up only fires a lifecycle event and returns 200 unconditionally — it never checks the database, Redis, or the queue heartbeat that /health checks.

Where:

  • bootstrap/app.php:14health: '/up'
  • routes/web.php:15-76 — the real, deep /health check (database/Redis/queue heartbeat)

Why it matters: Every deployment doc (DEPLOYMENT.md, DOCKER.md, LARAVEL-CLOUD.md) documents and points at /health, and none mention /up at all — it's an orphaned artifact of Laravel's default scaffolding. But platforms that auto-detect health checks by convention (e.g. Laravel Cloud, or a load balancer configured to probe /up by habit) would report the app healthy even when the DB, Redis, or queue worker are actually down, since /up doesn't check any of that. Having two health endpoints with different semantics under the same app is a real production-outage risk: whichever one gets wired to the platform's automated health checks determines whether a real outage is caught or masked.

Suggested fix: Remove health: '/up' from bootstrap/app.php (Laravel doesn't require it), or repoint it at the same status logic /health uses, so there is a single source of truth for health status.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions