horizon: Horizon dies after few seconds

Hey, I am trying to set up the local environment. I can see horizon dashboard with Inactive status. When I am running php artisan horizon the status changes to Active for a second and then changes back to Inactive again. I tried using supervisor to run horizon but the same problem. From the supervisor logs I can see that it’s running for a second, then restarting and starting again all the time. Is there any way to debug horizon and check why is it dying? I tried running php artisan horizon -vvv but every time the output is the same: Horizon started successfully. and then terminating the process. I can also confirm the queue is working fine when I run it using php artisan horizon:work.

Environment details: Using Apache as a server on Ubuntu 16.04. Laravel version: 5.6.14 PHP version: 7.2 Redis server version: 4.0.11 Horizon version: 1.3

Configuration config/queue.php

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

config/horizon.php

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

.env

APP_ENV=local
QUEUE_DRIVER=redis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

Any suggestions?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

Changed OS to Ubuntu 18.04 - this solved the problem. But some logging on horizon would be useful anyway.