Skip to main content

What is hibernation

Laravel Cloud hibernation is the legacy behavior that puts your environment into a dormant state when no HTTP requests arrive within a timeout window.
On modern Flex compute, this has been succeeded by the faster Scale to Zero model.
Legacy Flex hibernation can still reduce compute cost while dormant, but wake-up from HTTP requests typically takes 5–20 seconds. The new Scale to Zero starts in under 500ms and can also auto-start for scheduled tasks and queue processing while the app is sleeping.
For new Laravel Cloud projects, treat Scale to Zero as the safer default instead of legacy hibernation. For the full picture with Managed Queues and current pricing, see Laravel Cloud — A practical guide to Laravel’s dedicated PaaS.

What changed with Scale to Zero

With Scale to Zero on new Flex compute, major limitations of legacy hibernation are now reduced.
CategoryLegacy HibernationNew Scale to Zero
Wake-up on HTTP request5–20 secondsUnder 500ms
Scheduled TasksNot executed while sleepingAuto-starts and executes while sleeping
Queue processingNot executed while sleepingAuto-starts while sleeping. Managed Queues are recommended
Recommended useCost-saving in legacy Flex setupsCurrent default architecture
Legacy hibernation pauses scheduler and queue processing while asleep. Scale to Zero resolves this in most cases; queue processing is most reliable when combined with Managed Queues to ensure app sleep does not block job handling.

Enabling legacy hibernation

1

Open the App compute cluster

From your environment’s infrastructure canvas dashboard, click on the App compute cluster.
2

Enable the Hibernation toggle

Turn on the Hibernation toggle.
3

Save and redeploy

Click Save and Redeploy to apply the change.
Changing the toggle alone does not activate hibernation. A Save and Redeploy is required.
For newly enabled environments, use the App cluster Scale to Zero toggle instead. The limitations below primarily describe legacy hibernation behavior.

Limitations during legacy hibernation

When hibernation is enabled and the environment is hibernating, the following features do not run.
FeatureBehavior while hibernating
HTTP request handlingStopped (processed after wake-up)
Task SchedulerNot executed
Queue workersNot executed
Custom background processesNot executed
These processes resume automatically after the environment wakes up. Scheduled jobs that were due while the environment was hibernating are not retroactively executed.
Hibernation also has these constraints:
  • Only Flex compute sizes support hibernation. Pro compute sizes cannot hibernate.
  • Hibernation operates at the environment level. When an environment hibernates, all compute clusters in that environment hibernate, including Worker clusters.

Common causes of unwanted wake-ups

Any HTTP request will wake the environment, including those you did not intend to trigger:
  • Bots and crawlers — Search engines and security scanners automatically crawl pages.
  • Slack and Teams link previews — Messaging apps fetch page metadata when a URL is shared.
  • WordPress scanners — Automated scripts probe paths like /wp-admin looking for WordPress installations.
  • PHP file probing — Automated attacks scan for accessible PHP files.
Laravel Cloud’s *.laravel.cloud domains have an X-Robots-Tag: noindex, nofollow header to reduce indexing, but once a domain is discovered, this cannot fully prevent automated requests. Custom domains do not receive the noindex header.
Using a less predictable domain name reduces the chance of bots discovering your vanity domain.

Path Blocking to prevent unwanted wake-ups

Path Blocking lets Laravel Cloud block requests to specific file extensions and paths while the environment is hibernating, so those requests do not trigger a wake-up. The following extensions and paths are blocked by default: Blocked extensions:
.php, .php3, .php4, .php5, .php6, .php7, .php8,
.phtml, .pht, .phps, .env, .git
Blocked paths:
/wp-admin, /wp-content, /wp-includes, /wp-json
Requests matching these patterns receive a response without waking the environment.
Laravel applications do not use .php extension-based routing, so blocking these extensions has no impact on normal application behavior.

Good fit vs. poor fit for legacy hibernation

Good fit

  • Staging and development environments — Significant cost reduction since 24/7 uptime is not required.
  • Personal blogs and portfolios — Low traffic and occasional access.
  • Demo or proof-of-concept apps — On-demand wake-up is sufficient.
  • Low-frequency internal tools — Limited usage windows.

Poor fit

  • Workloads relying on Task Schedulerschedule:run does not execute while hibernating.
  • Workloads requiring regular queue processing — Queue workers stop during hibernation.
  • Production apps with strict latency requirements — 5–20 second wake-up time may be unacceptable.
  • Apps using WebSockets — Connections cannot be maintained and hibernation may be delayed.
If your application depends on scheduled tasks running reliably (email delivery, data aggregation, etc.), enabling hibernation will break those tasks. Either keep hibernation disabled, or use an external scheduler (such as GitHub Actions) to send periodic requests and keep the environment running.
In Scale to Zero, this is largely improved: Scheduled Tasks can auto-run while sleeping, and queue workloads can continue reliably when you use Managed Queues.

Summary

Hibernation can still reduce costs on legacy Flex setups, but Scale to Zero is now the practical default.
  • Legacy Flex bills by active runtime and enters sleep after timeout.
  • Legacy hibernation wake-up takes 5–20 seconds.
  • Scale to Zero starts in under 500ms.
  • In Scale to Zero, Scheduled Tasks and Managed Queues can run while sleeping.
  • Use Path Blocking to prevent bot-triggered wake-ups.
  • Only Flex compute supports these sleep models.

Scheduling

Task Scheduler configuration and how it works with Laravel Cloud.

Queues

Queue worker configuration and how to manage workers on Laravel Cloud.

Laravel Cloud overview

See Managed Queues, Scale to Zero, and pricing changes in one place.
Last modified on June 3, 2026