Health check path
Health check path
The health check path is a URL endpoint in your application that Ploi Cloud periodically requests to determine if your application is running correctly. When configured, Ploi Cloud sends HTTP requests to this path and expects a 200 HTTP status code in response. Any other status code (or no response) is treated as a failure.
Why health checks matter
Without a health check, Ploi Cloud has no way to know whether your application is actually working. Configuring a health check path enables three things:
- Automatic restarts - If your application stops responding, Ploi Cloud detects this and automatically restarts the failing instance.
- Safe deployments - During a deployment, Ploi Cloud waits for new instances to pass the health check before routing traffic to them. This prevents broken deployments from affecting your users.
- Accurate status monitoring - The application status on your dashboard reflects the actual state of your application. Without a health check, the status may show as running even when the application is not functioning.
If no health check is configured, Ploi Cloud cannot detect application failures and will not automatically recover from crashes.
Default values by application type
When you create a new application, Ploi Cloud sets a default health check path based on the application type:
- Laravel -
/(serves the welcome page by default) - Statamic -
/up(built-in health endpoint provided by Laravel) - WordPress -
/wp-admin/install.php(always returns a response, even before setup) - Craft CMS -
/index.php(entry point that always responds) - Node.js -
/(serves the root page by default) - PHP -
/(serves the root page by default)
You can change the health check path at any time in your application settings. The change requires a new deployment to take effect.
Recommended health check paths
For Laravel applications, the recommended health check path is /up. This is a built-in Laravel endpoint (available since Laravel 11) that returns a 200 status code when the application is running. It does not query the database or perform heavy operations, making it a fast and reliable health check.
To use it, set your health check path to /up in your application settings.
For other application types, the health check path should point to any endpoint that:
- Always returns a 200 HTTP status code when the application is healthy
- Responds quickly (within a few seconds)
- Does not require authentication
- Does not perform heavy operations like database queries or external API calls
How health checks work
Ploi Cloud runs two types of health checks on your application:
- Readiness check - Runs every 5 seconds to determine if your application is ready to receive traffic. If it fails, traffic is temporarily routed away from that instance.
- Liveness check - Runs every 15 seconds to determine if your application is still alive. If it fails repeatedly, the instance is automatically restarted.
Both checks send an HTTP GET request to the configured health check path. A 200 status code means the check passes. Any other response (or a timeout) means the check fails.
Configuring the health check path
- Go to your application in Ploi Cloud
- Open the Settings tab
- Find the Health check path field
- Enter a path starting with
/(for example,/upor/health) - Save your settings
The change will require a new deployment to take effect.
Common issues
Health check returns 404
The configured path does not exist in your application. Make sure the URL is correct and the route is registered. For Laravel apps, /up is available by default and does not need any additional configuration.
Health check returns 500
Your application is crashing when the health check endpoint is accessed. This usually means an unhandled exception or a misconfiguration. Check your application logs for details.
Health check returns 503
Your application is in maintenance mode. If you use php artisan down, the health check will fail. Laravel's /up endpoint bypasses maintenance mode and will continue to return 200.
Application keeps restarting
If the health check consistently fails, Ploi Cloud will keep restarting the instance. This creates a restart loop. Check your application logs to identify the root cause. Common causes include:
- Missing environment variables
- Database connection failures
- Out-of-memory errors
- Slow startup time (the application takes too long to become ready)
No health check configured
If the health check path is empty, you will see a warning in your application settings. Without a health check, Ploi Cloud cannot automatically detect or recover from failures.