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

stevenh1901's avatar

Laravel Horizon only catching some jobs

Hi! I'm hosting laravel horizon on my server, but it's only catching some jobs. Below is configuration options. The EC2CreateSnapshot job kicks off another job (EC2CheckCreateSnapshotStatus), but i'm not seeing it in horizon. I see the job in telescope with a status of pending but it just stays there. I also see the job in the database under the jobs table... but I'm not using the database driver.

.env

BROADCAST_CONNECTION="reverb"
FILESYSTEM_DISK=s3
QUEUE_CONNECTION=redis

CACHE_STORE=redis
CACHE_PREFIX=

MEMCACHED_HOST=127.0.0.1

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

config/horizon.php

logs

   INFO  Horizon started successfully.  

  2025-10-24 16:45:17 App\Jobs\EC2CreateSnapshot ..................... RUNNING
  2025-10-24 16:45:18 App\Jobs\EC2CreateSnapshot ............... 869.65ms DONE
0 likes
9 replies
Glukinho's avatar

Horizon is only for redis queues. If your job falls into default database queue it is not visible in Horizon and not processed (since you don't have queue worker for database queue).

Show code where this invisible job is defined and dispatched. Maybe it has wrong queue connection set or something.

stevenh1901's avatar
Glukinho's avatar

It has nothing todo with your problem, but you can release a job back to a queue with specified delay instead of dispatching a job itself again. Make your life a bit easier:

// instead of:
self::dispatch($this->user, $this->accountID, $this->instanceID, $this->snapshotID, $this->snapshotDescription, $this->existingSnapshots)->delay(now()->addSeconds(10));

// do so:
$this->release(10);
return;
Glukinho's avatar

Can you also post a code which calls dispatching of this job?

stevenh1901's avatar
Glukinho's avatar

I don't see anything wrong.

I see the job in telescope with a status of pending but it just stays there. I also see the job in the database under the jobs table

Can you show what exactly you see in Telescope and in database?

stevenh1901's avatar

I can't upload pictures, but it's on the Jobs page in Telescope. And here's the payload in the database.

{"uuid":"d9cc6470-5e87-4d05-9b13-0ae22e6cde5d","displayName":"App\\Jobs\\EC2CheckCreateSnapshotStatus","job":"Illuminate\\Queue\\CallQueuedHandler@call","maxTries":20,"maxExceptions":null,"failOnTimeout":false,"backoff":null,"timeout":null,"retryUntil":null,"data":{"commandName":"App\\Jobs\\EC2CheckCreateSnapshotStatus","command":"O:37:\"App\\Jobs\\EC2CheckCreateSnapshotStatus\":6:{s:43:\"\u0000App\\Jobs\\EC2CheckCreateSnapshotStatus\u0000user\";O:45:\"Illuminate\\Contracts\\Database\\ModelIdentifier\":5:{s:5:\"class\";s:15:\"App\\Models\\User\";s:2:\"id\";i:1;s:9:\"relations\";a:0:{}s:10:\"connection\";s:5:\"mysql\";s:15:\"collectionClass\";N;}s:12:\"\u0000*\u0000accountID\";i:255524045314;s:13:\"\u0000*\u0000instanceID\";s:19:\"i-0a64d1a7630dcff18\";s:10:\"snapshotID\";s:22:\"snap-00019c0d6245f0799\";s:19:\"snapshotDescription\";s:4:\"test\";s:17:\"existingSnapshots\";O:10:\"Aws\\Result\":2:{s:16:\"\u0000Aws\\Result\u0000data\";a:2:{s:9:\"Snapshots\";a:0:{}s:9:\"@metadata\";a:4:{s:10:\"statusCode\";i:200;s:12:\"effectiveUri\";s:36:\"https:\/\/ec2.us-east-2.amazonaws.com\/\";s:7:\"headers\";a:7:{s:16:\"x-amzn-requestid\";s:36:\"efbfe1f5-8aaa-4164-9f98-2a257feda724\";s:13:\"cache-control\";s:18:\"no-cache, no-store\";s:25:\"strict-transport-security\";s:35:\"max-age=31536000; includeSubDomains\";s:12:\"content-type\";s:22:\"text\/xml;charset=UTF-8\";s:14:\"content-length\";s:3:\"227\";s:4:\"date\";s:29:\"Fri, 24 Oct 2025 21:45:18 GMT\";s:6:\"server\";s:9:\"AmazonEC2\";}s:13:\"transferStats\";a:1:{s:4:\"http\";a:1:{i:0;a:0:{}}}}}s:28:\"\u0000Aws\\Result\u0000monitoringEvents\";a:0:{}}}"},"nightwatch":{"job_id":"a75849a4-34f3-42d1-a82f-9dc9ba369c4a"},"illuminate:log:context":{"data":[],"hidden":{"nightwatch_trace_id":"s:36:\"2fe491ff-4a29-440a-bf3c-6565be994be1\";","nightwatch_should_sample":"b:1;","nightwatch_user_id":"s:1:\"1\";"}},"telescope_uuid":"a0317252-d759-460e-88f1-bb8bd3979de1"}
Glukinho's avatar

I don't see why EC2CheckCreateSnapshotStatus is dispatched to database queue instead of redis.

Did you provide full and actual .env file?

Can you show config/queue.php?

Did you try to clear cache with php artisan cache:clear and fully restart queue workers in case they can still have old configuration with QUEUE_CONNECTION=database or something like that?

stevenh1901's avatar

Ohp... It appears the issue was a php artisan cache:clear. Thank you for the help

Please or to participate in this conversation.