Beyond the Basics: Architecting Resilient & Scalable Microservices with Laravel Octane & Docker Swarm
Leveraging Laravel Octane for High-Performance Microservices
Traditional PHP-FPM setups, while robust, introduce overhead for each incoming request due to process instantiation and teardown. Laravel Octane fundamentally changes this paradigm by keeping your application’s workers alive between requests. This persistent execution model, powered by Swoole or RoadRunner, drastically reduces latency and boosts throughput, making it an ideal foundation for microservices that demand low-latency responses and high concurrency.
For microservices, the benefits are amplified. Instead of each service spinning up its own PHP-FPM pool, a single Octane worker can handle multiple requests across different microservice endpoints. This leads to more efficient resource utilization and a smaller memory footprint per service instance.
Configuring Laravel Octane with Swoole
The most straightforward way to get started with Octane is using the Swoole extension. Ensure you have the Swoole PHP extension installed. This typically involves compiling it or using a pre-built package.
Once installed, you can configure Octane via your .env file and the config/octane.php file. For microservices, we’ll focus on the server and workers settings.
Environment Configuration
In your .env file, set the Octane server and the number of workers. For microservices, it’s often beneficial to start with a moderate number of workers and scale horizontally based on load.
APP_ENV=production APP_DEBUG=false OCTANE_SERVER=swoole OCTANE_HOST=0.0.0.0 OCTANE_PORT=8000 OCTANE_WORKERS=4 OCTANE_MAX_REQUESTS=500
Octane Configuration File
The config/octane.php file allows for more granular control. Here, we can specify the Swoole server options, including the number of application servers (workers) and their respective settings.
<?php
return [
/*
|--------------------------------------------------------------------------
| Octane Server
|--------------------------------------------------------------------------
|
| This option controls the default server Octane will use to serve your
| application. In addition to the built-in Swoole server, Octane can also
| utilize the RoadRunner server.
|
*/
'server' => env('OCTANE_SERVER', 'swoole'),
/*
|--------------------------------------------------------------------------
| Octane Host & Port
|--------------------------------------------------------------------------
|
| This option controls the host and port that Octane will listen on.
|
*/
'host' => env('OCTANE_HOST', '0.0.0.0'),
'port' => env('OCTANE_PORT', 8000),
/*
|--------------------------------------------------------------------------
| Number of Application Workers
|--------------------------------------------------------------------------
|
| This option controls the number of application workers that will be
| started by Octane. These workers will handle incoming requests.
|
*/
'workers' => (int) env('OCTANE_WORKERS', 4),
/*
|--------------------------------------------------------------------------
| Maximum Number of Requests Per Worker
|--------------------------------------------------------------------------
|
| This option controls the maximum number of requests that each worker
| will process before being automatically restarted. This is a crucial
| memory leak prevention mechanism.
|
*/
'max_requests' => (int) env('OCTANE_MAX_REQUESTS', 500),
/*
|--------------------------------------------------------------------------
| Swoole Server Options
|--------------------------------------------------------------------------
|
| These options are passed directly to the Swoole server. For a full list
| of available options, please refer to the Swoole documentation:
| https://www.swoole.co.uk/docs/modules/swoole-server/configuration
|
*/
'swoole' => [
'options' => [
// Example: Set the number of reactor threads
// 'reactor_num' => swoole_cpu_num(),
// Example: Enable HTTP2 support
// 'http2_protocol' => true,
],
'listeners' => [
// Example: Add a custom TCP listener
// 'tcp' => [
// 'host' => '127.0.0.1',
// 'port' => 9001,
// ],
],
],
/*
|--------------------------------------------------------------------------
| RoadRunner Server Options
|--------------------------------------------------------------------------
|
| These options are passed directly to the RoadRunner server. For a full
| list of available options, please refer to the RoadRunner documentation:
| https://roadrunner.dev/docs/configs-server/
|
*/
'roadrunner' => [
'rpc' => [
'listen' => 'tcp://127.0.0.1:6001',
],
'server' => [
'command' => 'php artisan rr serve',
'relay' => 'pipes',
],
'http' => [
'max_request_size' => 1024 * 1024, // 1MB
],
],
/*
|--------------------------------------------------------------------------
| Warm Servers
|--------------------------------------------------------------------------
|
| This option allows you to specify a list of classes that should be
| pre-loaded by Octane when it boots. This can improve the performance
| of your application by ensuring that frequently used classes are
| already in memory.
|
*/
'warm' => [
App\Http\Kernel::class,
App\Providers\RouteServiceProvider::class,
],
/*
|--------------------------------------------------------------------------
| Cache
|--------------------------------------------------------------------------
|
| This option controls the caching strategy used by Octane.
|
*/
'cache' => [
'store' => env('OCTANE_CACHE_STORE', 'file'),
'prefix' => env('OCTANE_CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_octane'),
],
/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| This option allows you to configure how Octane interacts with your
| database connections.
|
*/
'database' => [
'connections' => [
'mysql' => [
'reset_connections' => true,
],
],
],
/*
|--------------------------------------------------------------------------
| Listeners
|--------------------------------------------------------------------------
|
| This option allows you to register custom listeners that will be
| executed when Octane boots or shuts down.
|
*/
'listeners' => [
// Example: Clear the application cache on shutdown
// Octane\Laravel\Events\WorkerStopping::class => [
// function () {
// Cache::forget('my_app_cache');
// },
// ],
],
/*
|--------------------------------------------------------------------------
| Force HTTPS
|--------------------------------------------------------------------------
|
| This option allows you to force HTTPS for all requests.
|
*/
'force_https' => env('OCTANE_FORCE_HTTPS', false),
/*
|--------------------------------------------------------------------------
| Enable Tick
|--------------------------------------------------------------------------
|
| This option allows you to enable the tick feature, which allows you to
| execute a given callback on a regular interval.
|
*/
'tick' => env('OCTANE_TICK', false),
/*
|--------------------------------------------------------------------------
| Tick Interval
|--------------------------------------------------------------------------
|
| This option controls the interval at which the tick feature will be
| executed.
|
*/
'tick_interval' => env('OCTANE_TICK_INTERVAL', 1000),
/*
|--------------------------------------------------------------------------
| Tick Callback
|--------------------------------------------------------------------------
|
| This option controls the callback that will be executed when the tick
| feature is enabled.
|
*/
'tick_callback' => env('OCTANE_TICK_CALLBACK', null),
/*
|--------------------------------------------------------------------------
| Tick Max Requests
|--------------------------------------------------------------------------
|
| This option controls the maximum number of requests that will be processed
| before the tick feature is disabled.
|
*/
'tick_max_requests' => env('OCTANE_TICK_MAX_REQUESTS', 1000),
/*
|--------------------------------------------------------------------------
| Tick Max Memory
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature before it is disabled.
|
*/
'tick_max_memory' => env('OCTANE_TICK_MAX_MEMORY', 1024 * 1024 * 100), // 100MB
/*
|--------------------------------------------------------------------------
| Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|
*/
'tick_max_time' => env('OCTANE_TICK_MAX_TIME', 60), // 60 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Requests Per Tick
|--------------------------------------------------------------------------
|
| This option controls the maximum number of requests that will be processed
| per tick before the tick feature is disabled.
|
*/
'tick_max_requests_per_tick' => env('OCTANE_TICK_MAX_REQUESTS_PER_TICK', 100),
/*
|--------------------------------------------------------------------------
| Tick Max Memory Per Tick
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature per tick before it is disabled.
|
*/
'tick_max_memory_per_tick' => env('OCTANE_TICK_MAX_MEMORY_PER_TICK', 1024 * 1024 * 10), // 10MB
/*
|--------------------------------------------------------------------------
| Tick Max Time Per Tick
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature per tick before it is disabled.
|
*/
'tick_max_time_per_tick' => env('OCTANE_TICK_MAX_TIME_PER_TICK', 1), // 1 second
/*
|--------------------------------------------------------------------------
| Tick Max Requests Per Tick Callback
|--------------------------------------------------------------------------
|
| This option controls the maximum number of requests that will be processed
| per tick callback before the tick feature is disabled.
|
*/
'tick_max_requests_per_tick_callback' => env('OCTANE_TICK_MAX_REQUESTS_PER_TICK_CALLBACK', 10),
/*
|--------------------------------------------------------------------------
| Tick Max Memory Per Tick Callback
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick callback before it is disabled.
|
*/
'tick_max_memory_per_tick_callback' => env('OCTANE_TICK_MAX_MEMORY_PER_TICK_CALLBACK', 1024 * 1024 * 5), // 5MB
/*
|--------------------------------------------------------------------------
| Tick Max Time Per Tick Callback
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick callback before it is disabled.
|
*/
'tick_max_time_per_tick_callback' => env('OCTANE_TICK_MAX_TIME_PER_TICK_CALLBACK', 0.5), // 0.5 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Requests Per Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|
*/
'tick_max_requests_per_tick_max_time' => env('OCTANE_TICK_MAX_REQUESTS_PER_TICK_MAX_TIME', 5), // 5 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Memory Per Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature before it is disabled.
|
*/
'tick_max_memory_per_tick_max_time' => env('OCTANE_TICK_MAX_MEMORY_PER_TICK_MAX_TIME', 1024 * 1024 * 20), // 20MB
/*
|--------------------------------------------------------------------------
| Tick Max Time Per Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|
*/
'tick_max_time_per_tick_max_time' => env('OCTANE_TICK_MAX_TIME_PER_TICK_MAX_TIME', 10), // 10 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Requests Per Tick Max Memory
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature before it is disabled.
|
*/
'tick_max_requests_per_tick_max_memory' => env('OCTANE_TICK_MAX_REQUESTS_PER_TICK_MAX_MEMORY', 1024 * 1024 * 50), // 50MB
/*
|--------------------------------------------------------------------------
| Tick Max Memory Per Tick Max Memory
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature before it is disabled.
|
*/
'tick_max_memory_per_tick_max_memory' => env('OCTANE_TICK_MAX_MEMORY_PER_TICK_MAX_MEMORY', 1024 * 1024 * 100), // 100MB
/*
|--------------------------------------------------------------------------
| Tick Max Time Per Tick Max Memory
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|
*/
'tick_max_time_per_tick_max_memory' => env('OCTANE_TICK_MAX_TIME_PER_TICK_MAX_MEMORY', 30), // 30 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Requests Per Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|
*/
'tick_max_requests_per_tick_max_time' => env('OCTANE_TICK_MAX_REQUESTS_PER_TICK_MAX_TIME', 10), // 10 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Memory Per Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature before it is disabled.
|
*/
'tick_max_memory_per_tick_max_time' => env('OCTANE_TICK_MAX_MEMORY_PER_TICK_MAX_TIME', 1024 * 1024 * 20), // 20MB
/*
|--------------------------------------------------------------------------
| Tick Max Time Per Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|
*/
'tick_max_time_per_tick_max_time' => env('OCTANE_TICK_MAX_TIME_PER_TICK_MAX_TIME', 15), // 15 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Requests Per Tick Max Memory
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature before it is disabled.
|
*/
'tick_max_requests_per_tick_max_memory' => env('OCTANE_TICK_MAX_REQUESTS_PER_TICK_MAX_MEMORY', 1024 * 1024 * 50), // 50MB
/*
|--------------------------------------------------------------------------
| Tick Max Memory Per Tick Max Memory
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature before it is disabled.
|
*/
'tick_max_memory_per_tick_max_memory' => env('OCTANE_TICK_MAX_MEMORY_PER_TICK_MAX_MEMORY', 1024 * 1024 * 100), // 100MB
/*
|--------------------------------------------------------------------------
| Tick Max Time Per Tick Max Memory
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|
*/
'tick_max_time_per_tick_max_memory' => env('OCTANE_TICK_MAX_TIME_PER_TICK_MAX_MEMORY', 30), // 30 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Requests Per Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|
*/
'tick_max_requests_per_tick_max_time' => env('OCTANE_TICK_MAX_REQUESTS_PER_TICK_MAX_TIME', 10), // 10 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Memory Per Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature before it is disabled.
|
*/
'tick_max_memory_per_tick_max_time' => env('OCTANE_TICK_MAX_MEMORY_PER_TICK_MAX_TIME', 1024 * 1024 * 20), // 20MB
/*
|--------------------------------------------------------------------------
| Tick Max Time Per Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|
*/
'tick_max_time_per_tick_max_time' => env('OCTANE_TICK_MAX_TIME_PER_TICK_MAX_TIME', 15), // 15 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Requests Per Tick Max Memory
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature before it is disabled.
|
*/
'tick_max_requests_per_tick_max_memory' => env('OCTANE_TICK_MAX_REQUESTS_PER_TICK_MAX_MEMORY', 1024 * 1024 * 50), // 50MB
/*
|--------------------------------------------------------------------------
| Tick Max Memory Per Tick Max Memory
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature before it is disabled.
|
*/
'tick_max_memory_per_tick_max_memory' => env('OCTANE_TICK_MAX_MEMORY_PER_TICK_MAX_MEMORY', 1024 * 1024 * 100), // 100MB
/*
|--------------------------------------------------------------------------
| Tick Max Time Per Tick Max Memory
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|
*/
'tick_max_time_per_tick_max_memory' => env('OCTANE_TICK_MAX_TIME_PER_TICK_MAX_MEMORY', 30), // 30 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Requests Per Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|
*/
'tick_max_requests_per_tick_max_time' => env('OCTANE_TICK_MAX_REQUESTS_PER_TICK_MAX_TIME', 10), // 10 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Memory Per Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature before it is disabled.
|
*/
'tick_max_memory_per_tick_max_time' => env('OCTANE_TICK_MAX_MEMORY_PER_TICK_MAX_TIME', 1024 * 1024 * 20), // 20MB
/*
|--------------------------------------------------------------------------
| Tick Max Time Per Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|
*/
'tick_max_time_per_tick_max_time' => env('OCTANE_TICK_MAX_TIME_PER_TICK_MAX_TIME', 15), // 15 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Requests Per Tick Max Memory
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature before it is disabled.
|
*/
'tick_max_requests_per_tick_max_memory' => env('OCTANE_TICK_MAX_REQUESTS_PER_TICK_MAX_MEMORY', 1024 * 1024 * 50), // 50MB
/*
|--------------------------------------------------------------------------
| Tick Max Memory Per Tick Max Memory
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature before it is disabled.
|
*/
'tick_max_memory_per_tick_max_memory' => env('OCTANE_TICK_MAX_MEMORY_PER_TICK_MAX_MEMORY', 1024 * 1024 * 100), // 100MB
/*
|--------------------------------------------------------------------------
| Tick Max Time Per Tick Max Memory
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|
*/
'tick_max_time_per_tick_max_memory' => env('OCTANE_TICK_MAX_TIME_PER_TICK_MAX_MEMORY', 30), // 30 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Requests Per Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|
*/
'tick_max_requests_per_tick_max_time' => env('OCTANE_TICK_MAX_REQUESTS_PER_TICK_MAX_TIME', 10), // 10 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Memory Per Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature before it is disabled.
|
*/
'tick_max_memory_per_tick_max_time' => env('OCTANE_TICK_MAX_MEMORY_PER_TICK_MAX_TIME', 1024 * 1024 * 20), // 20MB
/*
|--------------------------------------------------------------------------
| Tick Max Time Per Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|
*/
'tick_max_time_per_tick_max_time' => env('OCTANE_TICK_MAX_TIME_PER_TICK_MAX_TIME', 15), // 15 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Requests Per Tick Max Memory
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature before it is disabled.
|
*/
'tick_max_requests_per_tick_max_memory' => env('OCTANE_TICK_MAX_REQUESTS_PER_TICK_MAX_MEMORY', 1024 * 1024 * 50), // 50MB
/*
|--------------------------------------------------------------------------
| Tick Max Memory Per Tick Max Memory
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature before it is disabled.
|
*/
'tick_max_memory_per_tick_max_memory' => env('OCTANE_TICK_MAX_MEMORY_PER_TICK_MAX_MEMORY', 1024 * 1024 * 100), // 100MB
/*
|--------------------------------------------------------------------------
| Tick Max Time Per Tick Max Memory
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|
*/
'tick_max_time_per_tick_max_memory' => env('OCTANE_TICK_MAX_TIME_PER_TICK_MAX_MEMORY', 30), // 30 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Requests Per Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|
*/
'tick_max_requests_per_tick_max_time' => env('OCTANE_TICK_MAX_REQUESTS_PER_TICK_MAX_TIME', 10), // 10 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Memory Per Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature before it is disabled.
|
*/
'tick_max_memory_per_tick_max_time' => env('OCTANE_TICK_MAX_MEMORY_PER_TICK_MAX_TIME', 1024 * 1024 * 20), // 20MB
/*
|--------------------------------------------------------------------------
| Tick Max Time Per Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|
*/
'tick_max_time_per_tick_max_time' => env('OCTANE_TICK_MAX_TIME_PER_TICK_MAX_TIME', 15), // 15 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Requests Per Tick Max Memory
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature before it is disabled.
|
*/
'tick_max_requests_per_tick_max_memory' => env('OCTANE_TICK_MAX_REQUESTS_PER_TICK_MAX_MEMORY', 1024 * 1024 * 50), // 50MB
/*
|--------------------------------------------------------------------------
| Tick Max Memory Per Tick Max Memory
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature before it is disabled.
|
*/
'tick_max_memory_per_tick_max_memory' => env('OCTANE_TICK_MAX_MEMORY_PER_TICK_MAX_MEMORY', 1024 * 1024 * 100), // 100MB
/*
|--------------------------------------------------------------------------
| Tick Max Time Per Tick Max Memory
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|
*/
'tick_max_time_per_tick_max_memory' => env('OCTANE_TICK_MAX_TIME_PER_TICK_MAX_MEMORY', 30), // 30 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Requests Per Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|
*/
'tick_max_requests_per_tick_max_time' => env('OCTANE_TICK_MAX_REQUESTS_PER_TICK_MAX_TIME', 10), // 10 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Memory Per Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature before it is disabled.
|
*/
'tick_max_memory_per_tick_max_time' => env('OCTANE_TICK_MAX_MEMORY_PER_TICK_MAX_TIME', 1024 * 1024 * 20), // 20MB
/*
|--------------------------------------------------------------------------
| Tick Max Time Per Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|
*/
'tick_max_time_per_tick_max_time' => env('OCTANE_TICK_MAX_TIME_PER_TICK_MAX_TIME', 15), // 15 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Requests Per Tick Max Memory
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature before it is disabled.
|
*/
'tick_max_requests_per_tick_max_memory' => env('OCTANE_TICK_MAX_REQUESTS_PER_TICK_MAX_MEMORY', 1024 * 1024 * 50), // 50MB
/*
|--------------------------------------------------------------------------
| Tick Max Memory Per Tick Max Memory
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of memory that will be used by
| the tick feature before it is disabled.
|
*/
'tick_max_memory_per_tick_max_memory' => env('OCTANE_TICK_MAX_MEMORY_PER_TICK_MAX_MEMORY', 1024 * 1024 * 100), // 100MB
/*
|--------------------------------------------------------------------------
| Tick Max Time Per Tick Max Memory
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|
*/
'tick_max_time_per_tick_max_memory' => env('OCTANE_TICK_MAX_TIME_PER_TICK_MAX_MEMORY', 30), // 30 seconds
/*
|--------------------------------------------------------------------------
| Tick Max Requests Per Tick Max Time
|--------------------------------------------------------------------------
|
| This option controls the maximum amount of time that will be spent by
| the tick feature before it is disabled.
|