• Skip to secondary menu
  • Skip to main content
  • Skip to primary sidebar
  • Home
  • Projects
  • Products
  • Themes
  • Tools
  • Request for Quote

Vengala Vinay

Having 12+ Years of Experience in Software Development

  • Home
  • WordPress
  • PHP
    • Codeigniter
  • Django
  • Magento
  • Selenium
  • Server
Home » Beyond the Basics: Architecting Resilient & Scalable Microservices with Laravel Octane & Docker Swarm

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.
    |

Primary Sidebar

A little about the Author

Having 12+ Years of Experience in Software Development, Vinay is a principal software architect, senior systems engineer, and elite technical consultant. He specializes in bespoke PHP/WordPress development, high-performance Magento 2 & Shopify architectures, custom plugin/theme development from scratch, and legacy code modernization (including VB6, VB.NET, PyQt, and Crystal Reports). Known for solving complex database bottlenecks, speed optimization (Core Web Vitals), and advanced security code auditing, Vinay engineers production-ready systems designed to scale under heavy concurrent load conditions.



Chat on WhatsApp

Recent Posts

  • Shifting WordPress to a Headless Microservices Architecture with Laravel & Docker: A Performance and Scalability Deep Dive
  • Harnessing the Power of PHP 9’s JIT Compiler for Sub-Millisecond API Response Times with Laravel Octane and Redis Caching
  • Beyond the Basics: Architecting Resilient & Scalable Microservices with Laravel Octane & Docker Swarm
  • From Monolith to Microservices: A Practical Guide to Decoupling Laravel Applications with Docker and AWS Lambda
  • Leveraging PHP 8.3 JIT and OpCache for Microservice Performance: A Deep Dive into Runtime Optimization

Categories

  • apache (1)
  • AWS (1)
  • Business & Monetization (390)
  • Centos (4)
  • Comparisons & Decision Making (55)
  • Debian (2)
  • Debugging & Troubleshooting (664)
  • Desktop Applications (14)
  • DevOps (22)
  • DevOps & Cloud Scaling (962)
  • Django (1)
  • Laravel (21)
  • Migration & Architecture (192)
  • Mobile Applications (24)
  • MySQL (1)
  • Performance & Optimization (873)
  • Performance & Security Optimization (4)
  • PHP (76)
  • PHP Development (49)
  • Plugins & Themes (244)
  • Programming Languages (10)
  • Python (20)
  • Ruby on Rails (1)
  • Security & Compliance (650)
  • SEO & Growth (492)
  • Server (118)
  • Softwares (1)
  • Ubuntu (9)
  • Uncategorized (144)
  • VB6 & VB.NET (8)
  • Web Applications & Frontend (19)
  • Web Assembly (Wasm) (2)
  • WordPress (58)
  • WordPress Plugin Development (728)
  • WordPress Theme Development (357)

Recent Posts

  • Shifting WordPress to a Headless Microservices Architecture with Laravel & Docker: A Performance and Scalability Deep Dive
  • Harnessing the Power of PHP 9's JIT Compiler for Sub-Millisecond API Response Times with Laravel Octane and Redis Caching
  • Beyond the Basics: Architecting Resilient & Scalable Microservices with Laravel Octane & Docker Swarm

Top Categories

  • DevOps & Cloud Scaling (962)
  • Performance & Optimization (873)
  • WordPress Plugin Development (728)
  • Debugging & Troubleshooting (664)
  • Security & Compliance (650)
  • SEO & Growth (492)

Our Products

  • ERP & LMS Systems (4)
  • Directories & Marketplaces (4)
  • Healthcare Portals (3)
  • Point of Sale (POS) (2)
  • E-Commerce Engines (2)

Our Services

  • E-Commerce Development (10)
  • WordPress Development (8)
  • Python & Desktop GUI (7)
  • General Consulting (7)
  • Legacy Modernization (5)
  • Mobile App Development (4)

Copyright © 2026 · Vinay Vengala