Skip to main content

What is Hibernation?

Hibernation (auto-sleep) on Laravel Cloud is a legacy feature that puts an environment into a suspended state when it hasn’t received an HTTP request for a certain period. On today’s new Flex compute, the faster Scale to Zero is used as its successor. Legacy Flex Hibernation stops compute billing during sleep, but it typically takes 5–20 seconds to wake up after receiving an HTTP request. The new Scale to Zero shortens startup to under 500ms, and even during sleep the environment automatically wakes for scheduled tasks and queue processing.
If you’re new to Laravel Cloud, it’s safer to plan around Scale to Zero rather than Hibernation. For the full picture including Managed Queues and the new pricing plans, see Laravel Cloud — a full look at the Laravel-native PaaS.

What Scale to Zero changed

With Scale to Zero on the new Flex compute, many of the pain points of the old Hibernation are largely resolved.
With the old Hibernation, task schedules and queues did not run while suspended. Scale to Zero resolves this—queue processing in particular can continue safely with Managed Queues even while the App cluster is asleep.

Enabling old Hibernation

1

Open the App compute cluster

On the environment’s infrastructure canvas dashboard, click the App compute cluster.
2

Enable Hibernation

Toggle Hibernation on.
3

Save and redeploy

Click Save and Redeploy to apply changes.
Changing the setting alone doesn’t take effect. Save and Redeploy is required.
To enable this on a current environment, use the App compute cluster’s Scale to Zero toggle. The limitations below primarily assume the old Hibernation / Legacy Flex.

Limitations while old Hibernation is suspended

While Hibernation is enabled and the environment is suspended, the following functions do not work.
When it wakes from suspension, these processes automatically resume. However, scheduled jobs that “should have run” during the sleep period are not executed retroactively.
Additionally, Hibernation has these constraints:
  • Only Flex compute can hibernate. Hibernation cannot be enabled on Pro compute.
  • Hibernation is applied per environment. When the App cluster hibernates, all Worker clusters in the same environment also hibernate.

Causes of unwanted wake-ups

The environment automatically wakes on any HTTP request, but unintended requests can also cause wake-ups.
  • Bots and crawlers — Search engines, security scanners, and other bots crawl pages automatically
  • Slack or Teams link previews — Messaging apps hit links to fetch thumbnails
  • WordPress scans — Automated scans looking for WordPress installations hit paths like /wp-admin
  • Attacks looking for .php files — Automated scans that directly probe for PHP files
Laravel Cloud’s *.laravel.cloud domains are given an X-Robots-Tag: noindex, nofollow header so search engines don’t index them, but once the domain is discovered you can’t fully prevent this. The noindex header is not added to custom domains.
Using a more complex domain name reduces the risk of bots discovering your vanity domain.

Preventing unwanted wake-ups with Path Blocking

Path Blocking blocks requests to certain extensions or paths without processing them, keeping the environment suspended. It prevents WordPress scans and attacks targeting PHP files from causing unwanted wake-ups. The extensions and paths blocked by default are: Blocked extensions:
Blocked paths:
These requests receive a response without waking the app, even while the environment is suspended.
Normal Laravel routing doesn’t use requests with a .php extension, so blocking them doesn’t affect your app.

Where old Hibernation fits and doesn’t fit

Good fits

  • Staging and development environments — no need for 24/7 uptime; significant cost savings
  • Personal blogs and portfolios — low-traffic use cases
  • Demo and trial apps — waking up on demand is enough
  • Low-frequency internal tools — limited usage windows

Poor fits

  • Uses task schedulingschedule:run doesn’t execute while suspended
  • Regular queued jobs required — queues stop while suspended
  • Production where startup latency isn’t acceptable — 5–20 seconds to wake
  • WebSocket-based apps — connections may not persist and hibernation may be delayed
If you use the task scheduler to run periodic jobs (email delivery, data aggregation, etc.), those jobs won’t run while Hibernation is active. In such cases, either turn Hibernation off or design an external scheduler (such as GitHub Actions) that sends requests to keep the environment awake.
The new Scale to Zero relaxes these constraints. Scheduled Tasks run automatically even while sleeping, and queue processing with Managed Queues isn’t affected by the App cluster’s suspension.

Summary

Hibernation is still useful for cost reduction on Legacy Flex, but Scale to Zero is more practical today.
  • Billed only for active time on Legacy Flex. Auto-suspends after a timeout.
  • Old Hibernation wake-up time is 5–20 seconds.
  • The new Scale to Zero starts up in under 500ms.
  • With Scale to Zero, Scheduled Tasks and Managed Queues work even while sleeping.
  • Path Blocking prevents unwanted wake-ups from bots.
  • Only Flex compute is supported.

Scheduling

See Task Scheduler configuration and behavior on Laravel Cloud.

Queues

See Queue Worker configuration and operations on Laravel Cloud.

Laravel Cloud overview

Managed Queues, Scale to Zero, and the new pricing plans in one place.
Last modified on July 13, 2026