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

jalfie's avatar

Queue configuration on Forge, redis not configured

I've got a site working fine locally and am attempting to get it functioning on Forge. Specifically accessing Horizon. When I try to do this, I am receiving a 403 Forbidden response.

Initially, focusing on this I set the gate in HorizonServiceProvider.php to be:

protected function gate()
{
    Gate::define('viewHorizon', function ($user) {
        // return $user->isAdmin();
        return true;
    });
}

However, this didn't resolve the issue and I have since begun to think my issue stems from queue configuration. Certainly user error...

The specific error I have most recently encountered is:

php: [2019-08-17 20:25:45] production.ERROR: Redis connection [redis] not configured. {"exception":"[object] (InvalidArgumentException(code: 0): Redis connection [redis] not configured. at /home/forge/site/vendor/laravel/framework/src/Illuminate/Redis/RedisManager.php:116)

These are the settings I am using in my project and are being deployed to Forge:

config/queue.php

'connections' => [
    'redis' => [
        'driver' => 'redis',
        'connection' => 'redis',
        'queue' => env('REDIS_QUEUE', 'default'),
        'retry_after' => 90,
        'block_for' => 5,
    ],
];

config/horizon.php

'environments' => [
    'production' => [
        'supervisor-1' => [
            'connection' => 'redis',
            'queue' => ['default', 'slow'],
            'balance' => 'auto',
            'processes' => 10,
            'tries' => 3,
        ],
    ],

    'local' => [
        'supervisor-1' => [
            'connection' => 'redis',
            'queue' => ['default', 'slow'],
            'balance' => 'auto',
            'processes' => 3,
            'tries' => 3,
        ],
    ],
],

.env

APP_NAME=site
APP_ENV=production
APP_KEY=base64:
APP_DEBUG=false
APP_LOG_LEVEL=debug
APP_URL=https://site

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=forge
DB_USERNAME=forge
DB_PASSWORD=pass

BROADCAST_DRIVER=pusher
CACHE_DRIVER=redis
SESSION_DRIVER=file
QUEUE_CONNECTION=redis

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

Forge Queue settings

https://imgur.com/LVVMd8O https://imgur.com/LVVMd8O

Final point, before arriving at the above configuration I was getting a different error. Not sure if this will be of use or if some clarification on how this relates to the connection/driver/queue settings.

No connector for [] exception":"[object] (InvalidArgumentException(code: 0): No connector for [] at laravel/framework/src/Illuminate/Queue/QueueManager.php:172)

Thank you!

0 likes
2 replies
jalfie's avatar

Re-watching that video and 2 others helped me find the issue (I believe!). It works now. I had a daemon setup in the server panel in Forge and then had start the queue workers as daemons also in the site panel. The config files were not changed and now the behaviour is working the same prod as dev. Thank you

Please or to participate in this conversation.