Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

booni3's avatar

Horizion - Queue worker on forge vs. app config code (queue.php / horizion.php)

I would like to get some clarification on the queue worker settings within forge vs. within my code config.

Within horizion.php

    'environments' => [
        'production' => [
            'supervisor-1' => [
                'connection' => 'redis',
                'queue' => ['default'],
                'balance' => 'simple',
                'processes' => 10,
                'tries' => 3,
            ],
            'supervisor-long-running' => [
                'connection' => 'redis',
                'queue' => ['default_long'],
                'balance' => 'simple',
                'processes' => 2,
                'tries' => 2,
                'timeout' => 900 // Timeout after 15 minutes
            ]
        ],

and queue.php

        'redis' => [
            'driver' => 'redis',
            'connection' => 'default',
            'queue' => 'default',
            'retry_after' => 90,
            'block_for' => null,
        ],

        'redis-long-running' => [
            'driver' => 'redis',
            'connection' => 'default',
            'queue' => 'default_long',
            'retry_after' => 1200, // Run for max 20 minutes
            'block_for' => null,
        ],

I can now send jobs to either queues and they seem to run fine.

Within Forge, under the site > queues tab I now have the option to start queue workers. Are these going to be any different to what I have setup within the config. Should I run both or just one of them?

0 likes
1 reply
_stefanzweifel's avatar

The "Queues" tab on Forge is not connected with Horizon. Adding a new worker through the Queues tab results in a worker that runs php artisan queue:work. Docs

If you want to use Horizon and your setup you have in config/horzion.php you would have to start a new Daemon. You can add a new one in the Servers > Daemons tab in Forge.

The command would be php artisan horizon and the directory would be something like /home/forge/example.com/. Don't forget to add php artisan horizon:terminate to the deploy script of your site to automatically restart the Horizon worker after each deployment.

Are these going to be any different to what I have setup within the config. Should I run both or just one of them?

So yes, using using the "Queues" tab results in different queue workers than with Horizon. As you've already installed Horizon I would highly recommend to stick to Horizon and it's config file.

Please or to participate in this conversation.