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 a maintenance flag. The adapter binary detects the flag and serves a maintenance response for all requests without forwarding them to your application.

Terminal window
ske maintenance:on --env production
⠋ Enabling maintenance mode...
✓ Maintenance mode enabled for production

This triggers a redeployment that activates the maintenance flag. All incoming requests receive a 503 Service Unavailable response with a maintenance page.

Terminal window
ske maintenance:off --env production
⠋ Disabling maintenance mode...
✓ Maintenance mode disabled for production

This triggers another redeployment that removes the maintenance flag. Traffic resumes normally.

  • All HTTP requests return 503 Service Unavailable
  • Queue processing is paused
  • Scheduled tasks continue to fire but are skipped by the application
  • The environment remains provisioned — no infrastructure is torn down
  • The deployment history shows entries of type maintenance
Terminal window
ske status --env production

The output includes the maintenance mode state:

Deployment #44
Type: maintenance
Status: succeeded
Maintenance: ON