0

horizon is setup in local is working properly, local horizon dashboard show me the supervisor info and current workload But in production horizon dashboard the status is active and not show supervisor and current workload info. it is showing batches in pending status

This type of horizon dashboard is showing in production :- https://user-images.githubusercontent.com/5956778/58878223-09ac0280-86d3-11e9-8442-fe0a58059174.png

-add the supervisors -update the QUEUE_CONNECTION to redis -try the php artisan horizon:terminate

1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. Commented Sep 1, 2023 at 19:30

2 Answers 2

0

make sure to modify your horizon config in config/horizon.php,

here is an example:

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

this array is default environment for your supervisor which can be located in horizon.php

and the following array environment in local and production:

     'environments' => [
        'production' => [
            'supervisor-1' => [
                'queue' => ['default'],
                'maxProcesses' => 10,
                'balanceMaxShift' => 1,
                'balanceCooldown' => 3,
            ], 
        ],

        'local' => [
            'supervisor-1' => [
                'queue' => ['default'],
                'maxProcesses' => 10,
            ],
        ],
    ],

i think you need to modify the production part to fix your problem. but if this not works too, send your supervisor configuration file maybe problems is there.

Sign up to request clarification or add additional context in comments.

Comments

0

Got the issue. horizon didn't find the app_env value in environments array

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.