Skip to content

Maintenance Mode

Maintenance mode takes an environment offline and displays a maintenance page to visitors. SKE implements maintenance mode through redeployment, not php artisan down.

On traditional servers, artisan down writes a file to the filesystem that Laravel checks on each request. On serverless infrastructure, the filesystem is ephemeral — each function invocation or container instance starts fresh. A maintenance file written in one instance doesn’t exist in others, and it disappears when the instance is recycled.

SKE solves this by redeploying the environment with MAINTENANCE_MODE=true, so every instance sees the same state. The SKE Laravel bridge reads it as Laravel’s maintenance mode, and Laravel answers requests with the application’s own 503 page, exactly as after artisan down.

In the dashboard, open the environment, open its More actions menu and select Enable maintenance, then confirm. The CLI has no maintenance command.

This triggers a redeployment that activates the maintenance flag. Requests receive Laravel’s 503 Service Unavailable maintenance page.

Select Disable maintenance in the same menu. This triggers another redeployment that removes the maintenance flag. Traffic resumes normally.

  • HTTP requests get Laravel’s 503 Service Unavailable page
  • Queued jobs keep running: queue workers are not paused
  • The scheduler skips tasks not marked evenInMaintenanceMode()
  • A MAINTENANCE_MODE_SECRET secret works like artisan down --secret: visiting /{secret} lets you in, with Laravel’s bypass cookie
  • The environment remains provisioned — no infrastructure is torn down
  • The deployment history shows entries of type maintenance

The environment’s page shows a Maintenance badge while it is in maintenance mode. The maintenance redeployment is listed with the others:

Terminal window
ske status --env production
Latest deployment: 7246190025113518094
Type: maintenance
Status: succeeded