May Sale! All accounts are 40% off this week.

DevHeaven's avatar

Laravel Horizon not loading any data

I've setup Horizon on my production environment. I'm running "php artisan hirozn" and it's processing my Job queue fine. queue driver is REDIS ,

PROBLEM : Horizon UI just shows "loading" and doesn't load any data

I'm adding my .env and horizon config files without credentials.

-- >.ENV 'APP_NAME=Laravel APP_ENV=production APP_KEY=base64:********** APP_DEBUG=true APP_URL=*********

LOG_CHANNEL=stack LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug

BROADCAST_DRIVER=log CACHE_DRIVER=file FILESYSTEM_DISK=local QUEUE_CONNECTION=redis SESSION_DRIVER=file SESSION_LIFETIME=120

MEMCACHED_HOST=127.0.0.1

REDIS_HOST=127.0.0.1 REDIS_PASSWORD=************* REDIS_PORT=6379'

--> horizon config /* |--------------------------------------------------------------------------

Queue Worker Configuration Here you may define the queue worker settings used by your application in all environments. These supervisors and settings handle all your queued jobs and will be provisioned by Horizon during deployment.
*/

'defaults' => [
    'supervisor-1' => [
        'connection' => 'redis',
        'queue' => ['default'],
        'balance' => 'auto',
        'autoScalingStrategy' => 'time',
        'maxProcesses' => 1,
        'maxTime' => 0,
        'maxJobs' => 0,
        'memory' => 256,
        'tries' => 10,
        'timeout' => 3600,
        'nice' => 0,
    ],
],

'environments' => [
    'production' => [
        'supervisor-1' => [
            'maxProcesses' => 25,
            'balanceMaxShift' => 1,
            'balanceCooldown' => 3,
            'connection' => 'redis',
        ],
    ],

    'local' => [
        'supervisor-1' => [
            'maxProcesses' => 25,
        ],
    ],
],
0 likes
3 replies
Nakov's avatar

Which PHP version are you running is it > 7.1?

Also make sure you truncate your failed_jobs table and clear redis and try again.

DevHeaven's avatar

Thanks for the reply Nakov,

I'm running PHP 8.1.2 on Ubuntu I have truncated failed_jobs table and executed FLUSHALL on redis Cleared Laravel cache/config/optimize

Restarted Horizon Ran a few jobs

No data -> still loading in Horizon UI

DevHeaven's avatar

ANybody else with any suggestions ? I've been unable to get this working. Thanks

Please or to participate in this conversation.