Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Octane Laravel Package

laravel/octane

Laravel Octane accelerates Laravel by running it on high-performance app servers like FrankenPHP, Open Swoole/Swoole, and RoadRunner. It boots your app once, keeps it in memory, and serves requests rapidly for better throughput and latency.

View on GitHub
Deep Wiki
Context7

Laravel Octane boosts Laravel application throughput by running your app on high-performance servers like FrankenPHP, Open Swoole / Swoole, and RoadRunner. It boots once, keeps the framework in memory, and serves requests with significantly reduced overhead for faster response times.

Designed for production workloads, Octane helps you get more performance from the same hardware while staying within the Laravel ecosystem.

  • Persistent application memory to avoid per-request bootstrapping
  • Supports FrankenPHP, Open Swoole/Swoole, and RoadRunner
  • Higher request throughput and lower latency under load
  • Integrates cleanly with Laravel’s configuration and tooling
  • Ideal for APIs, queues, and high-concurrency apps
Frequently asked questions about Octane
How does Laravel Octane improve performance compared to PHP-FPM?
Octane replaces PHP-FPM by booting Laravel once and keeping it in memory, eliminating per-request overhead. It uses event-driven servers like Swoole or RoadRunner to handle concurrent requests efficiently, reducing latency for APIs and WebSocket-heavy workloads by up to 10x in benchmarks. This is especially useful for high-traffic apps with >1000 RPS.
Which Laravel versions and PHP versions does Octane support?
Octane supports Laravel 10–13 and requires PHP 8.1+. For optimal performance, use PHP 8.5, which includes Octane-specific features like partitioned cookies. Always check the [official docs](https://laravel.com/docs/octane) for the latest compatibility matrix before upgrading.
Can I use Octane with Docker or Kubernetes?
Yes, Octane works seamlessly with Docker and Kubernetes. FrankenPHP and RoadRunner are container-friendly, with official Docker images available. For Kubernetes, ensure your deployment handles worker scaling and connection pooling (e.g., for databases). Example Dockerfiles are provided in the [Octane docs](https://laravel.com/docs/octane#docker).
How do I install and configure Octane for production?
Install via Composer: `composer require laravel/octane`. Choose a server (e.g., FrankenPHP) with `php artisan octane:install frankenphp`, then start it with `php artisan octane:start`. For production, use a process manager like Supervisor to keep workers alive. Configure your web server (e.g., Nginx) to proxy requests to Octane’s port (default: 1337).
Does Octane support WebSockets and real-time features?
Yes, Octane natively supports WebSockets via RoadRunner or FrankenPHP. For Laravel Echo, use the `pusher:ws` driver with Octane’s WebSocket server. Test real-time features locally with `php artisan octane:start --server=frankenphp` and verify connections using tools like `wscat`. Monitor WebSocket performance with Octane’s built-in metrics.
What are the risks of using Octane in production?
Key risks include worker crashes (due to memory leaks or misconfigurations) and database connection leaks in containerized environments. Mitigate these by monitoring with `octane:monitor`, using `DB::disconnect()` hooks, and testing async race conditions. Always have a rollback plan to revert to PHP-FPM if issues arise.
How does Octane handle file uploads or large payloads?
Octane works with file uploads, but Swoole may require additional configuration. Use the `FlushUploadedFiles` listener to clear temporary files after processing. For large payloads, consider offloading to queues or using RoadRunner’s async workers. Test uploads locally with `php artisan octane:test` to catch edge cases.
Can I mix Octane with Vite or Livewire in Laravel?
Yes, Octane supports Vite and Livewire, but per-request state (e.g., Vite HMR) may need adjustments. Ensure your Octane server is configured to handle long-lived connections. For Livewire, use the `livewire:wire` events and test real-time updates with `APP_DEBUG=true`. Debugging tools like FrankenPHP’s admin UI can help troubleshoot.
What alternatives exist to Laravel Octane for high performance?
Alternatives include standalone servers like Swoole (without Octane), RoadRunner (as a standalone service), or PHP-FPM with OPcache tuning. However, Octane integrates natively with Laravel’s ecosystem (queues, sessions, caching) and simplifies deployment. For CPU-bound tasks, offload work to queues or use Laravel Horizon instead of relying on Octane.
How do I debug issues in Octane, especially with async workers?
Debugging async issues requires `APP_DEBUG=true` and tools like FrankenPHP’s admin UI (port 2302) or RoadRunner’s metrics. Use `octane:monitor` to check worker health and logs. For Xdebug, attach to the Octane process manually or use FrankenPHP’s built-in debugger. Test edge cases with `php artisan octane:test` before deploying to production.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport