141 questions
1
vote
1
answer
439
views
Laravel 11: job rate limit to not exceed rate limit of external API
since Laravel 11 queues can also have a rate limit now (https://laravel.com/docs/11.x/queues#rate-limiting). My Laravel application is doing some requests to the Shopify API to fetch new products, add ...
0
votes
0
answers
35
views
Laravel dispatch job only triggered when other dispatch is called
The laravel dispatch job is only triggered when another dispatch is called.
Here is the code:
<?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;...
0
votes
0
answers
38
views
Laravel Horizon Dashboard - Failed Jobs tab causing memory error
We have deployed Horizon in production, and the jobs themselves are being processed fine. However, when we load the Horizon dashboard and go to the failed jobs tab we get this issue.
The front end ...
1
vote
0
answers
38
views
Laravel Horizon - What is actually running
Within horizon, jobs with Pending status can be:Delayed for later, waiting on a slot/capacity to run, running, or orphaned (horizon went away).
We need to be able to determine on a given supervisor ...
3
votes
1
answer
291
views
Enable nonce to laravel official packages
I'm currently working on a Laravel project that uses Telescope, Horizon, and Socialite. I've implemented a strict Content Security Policy (CSP) that disallows inline scripts, and I want to secure ...
0
votes
0
answers
35
views
Laravel Horizon - Gracefully Wait and Exit
artisan horizon:terminate --wait
Does not actually work as documented. The supervisor sends SIGTERM but the workers will abort running jobs. There are a number of discussions on github about this.
...
0
votes
0
answers
78
views
Jobs stuck in Pending , Horizon-Redis-Laravel
My Job kept stuck in pending after it is being dispatched , It neither transfers to fail or neither to done/completed. I am using Redis Connection with Horizon for Queue and trying to test at Staging ...
0
votes
1
answer
49
views
Laravel Horizon: One concurrent job per user
I am looking for a way that would allow me to only allow one job to run for each user at a time.
That could be through Job tags or something else. All I want is to specify the tag User:1 and based on ...
0
votes
1
answer
129
views
In Laravel Horizon, how do you get data to show up in the "Data" section?
In Laravel Horizon, if you select a job, there is a section on that page labelled "Data". Mine is blank, but I would love to put some data there, so I know what's going on. I have a class ...
0
votes
0
answers
33
views
Querying Redis for Horizon Values
I'm trying to query Redis for Horizon's pending jobs. I can see the laravel_horizon:pending_jobs entry in "sorted sets" when I am browsing Redis with PhpStorm's database tool.
If I double-...
3
votes
1
answer
616
views
Do I need a database in Laravel to set up redis queue and horizon
I currently have an api project that is kind of a middleware API. It get's requests and redirects it to other APIs and caches some things in redis for faster access.
Therefore I don't really need a ...
2
votes
0
answers
472
views
Laravel Horizon - Jobs in queue take much longer to complete when under load even though CPU/mem resources are abundant
Let me start off by saying that I am no PHP or Laravel expert, but a just a humble Engineer trying to figure out why Laravel Horizon job runtime spikes when a large influx of jobs is observed. Since ...
0
votes
0
answers
78
views
Laravel Horizon jobs keep running after timeout
I have an issue where on production jobs do not fail when they exceed the timeout that is set in the config but they run longer and then they timeout.
The timeout for the default queue is 60 seconds, ...
0
votes
1
answer
91
views
Laravel Job - Requeue or "Unfail" Specific Exceptions
We are using Laravel Jobs + Horizon, and have built a framework to retry jobs with exponential backoff using the hook for failed() as well as Job middleware to deal with log consolidation, but we've ...
1
vote
0
answers
59
views
Is it possible to use Laravel Horizon installed within one module to monitor queues in another module, both of which are using the same Redis?
iam new to Redis and Horizon
i have two laravel projects hosted in same server, which are using same database and same redis service.
Let's say the projects are X and Y.
I have configured Laravel ...
1
vote
0
answers
345
views
Laravel Horizon jobs pending not executed in local development running in docker
I try to add Laravel Horizon to my app on the local environment via doker to run a queue with Redis. After installation, I can see the Horizon dashboard. But when I try to add processes in the queue I ...
2
votes
1
answer
1k
views
Laravel Horizon and SQS
The Laravel documentation states:
Laravel Horizon requires that you use Redis to power your queue. Therefore, you should ensure that your queue connection is set to redis in your application's config/...
0
votes
0
answers
31
views
System's temp path differs from the fact, whether it's called in a queue or not
I got a really strange problem:
I got a service class, which is called within a queued job. This queued job is being chained and dispatched from an action class.
Inside this action class, ...
0
votes
1
answer
611
views
Call to undefined function Laravel\Horizon\Console\pcntl_async_signals() (Laravel Horizon)
I have installed laravel horizon using xampp having apache server. Here i need to use queue with redis so i have checked and installed wsl along with redis and run redis from wsl platform
insttalled ...
1
vote
1
answer
135
views
Different horizon configs based on server
In config/horizon.php you can define how many processes you want to dedicate to each Horizon queue. If I have a second server that isn't used for processing requests, and is just going to be used to ...
0
votes
1
answer
467
views
Failed jobs handling
I'm using Laravel Horizon which has a Failed Jobs section which used to work fine. Until I added the Sentry notification for failed jobs, in Job's Class.
/**
* Handle a job failure.
*
* @return ...
0
votes
0
answers
759
views
Horizon not processing jobs after Laravel upgrade from 9 to Laravel 10
I have made an upgrade on Laravel from 9 to 10 and now my laravel horizon is not processing jobs. Jobs are only processed if i run commands :
php artisan queue:listen and php artisan queue:work --once....
0
votes
1
answer
322
views
Two Horizon Instances on the same server causes errors
I have a test server that is running two versions of the exact same Laravel application each with their own instance of Laravel Horizon running (A staging site for new features and a demo site that ...
0
votes
0
answers
2k
views
How to completely stop Laravel Horizon
After uninstalling Laravel Horizon from my app, this command still keeps running on the server, php horizon:work redis --name=default. What do I do next?
0
votes
2
answers
2k
views
Laravel Horizon empty jobs
Just for context I do have 2 different Laravel projects.
project A - this is where I dispatch certain jobs
project B - this is where jobs being handled
I am using Laravel Homestead on my local setup,...
0
votes
2
answers
627
views
Laravel horizon failure on high availability setup
I'm running two Laravel apps in a high availability setup, with a load balancer directing traffic between them.
Both apps use the same Redis DB (AWS ElasticCache) for queues , and are set up with ...
0
votes
3
answers
2k
views
How to run a code when a Laravel Job try is killed by timeout (Horizon)
I created a Laravel Job with 3 tries and timeout after 10 minutes. I am using Horizon.
I can handle the failure after 3 tries using the method failed, but how can I handle the timeout event each 3 ...
1
vote
2
answers
946
views
Laravel/horizon missing css/js build
The /horizon route from the laravel/horizon package works, but the css and javascript are not loaded.
this is what the road /horizon looks like:
However, I just installed the package and followed the ...
6
votes
1
answer
2k
views
Laravel Horizon Restrictions and Optimization
Is there any rule of thumb or any logical relation between maxProcesses, number of supervisors and the total number of queues in laravel horizon?
What if I have 15 supervisors and 40 queues (each ...
0
votes
0
answers
214
views
Why does my laravel job fails with "No query results for model"?
I have a batch that calculates a score for many models. There is a horizon worker that process the batch, and most of the times, it runs with success.
However, sometimes, a job CalculateFieldScores ...
-1
votes
1
answer
2k
views
Php artisan horizon error when build container
i have an application written in laravel and i should manage queues through laravel HORIZON this application i should put it in a container and then deploy on AWS Fargate.
But strange things happen to ...
1
vote
0
answers
501
views
Redis intermittent "crash" on Laravel Horizon. Redis stops working every few weeks/months
I have an issue with Redis that effects running of Laravel Horizon Queue and I am unsure how to debug it at this stage, so am looking for some advice.
Issue
Approx. every 3 - 6 weeks my queues stop ...
0
votes
0
answers
96
views
Is it possible not to queue tasks if Redis is not available for some reason?
I use the Laravel Horizon. And it happens that Redis is unavailable for some reason.
Is it possible not to queue tasks if Redis is not available for some reason?
Of course, I can catch an exception ...
1
vote
1
answer
921
views
How to provide data for Laravel Horizon exception context?
When my job fails, Horizon will log the exception but it does not log any data inside that exception, so since my exception is made like this:
class ExecutionFailedException extends RuntimeException
{
...
0
votes
1
answer
2k
views
Multiple Laravel Horizon workers per supervisor using supervisord
I'm just moving our Laravel v8 queue driver from db to redis, using Horizon for management.
No matter what I configured in config/horizon.php, I was only getting either one worker process across all ...
0
votes
1
answer
176
views
Laravel-horizon not displaying messages from laravel-echo
I am using laravel-echo and laravel-horizon in my project. Sockets work great. The problem is that I can't see anything in the horizon even though the message for the socket goes through the queue and ...
0
votes
1
answer
953
views
Laravel Horizon Jobs - What exactly is stored in Redis?
If I have a queuable Job class that I've set up to be dispatched and handled through horizon with redis, I have some questions about exactly how redis stores the information for that job.
So, the base ...
1
vote
1
answer
353
views
Getting PID of queue in Horizon with Laravel
For different reasons I need to read the PID of the queues of a supervisor in Laravel Horizon. The problem is that I can't find the information in the library.
I'm able to retrieve all supervisor like ...
0
votes
1
answer
481
views
Laravel, Queue, Horizon and >10 Servers (Workers) - Creating several million jobs takes extremely long
I need to create several 10 million jobs.
I have tried it with for-loops and Bus::batch([]) and unfortunately the creation of the jobs takes longer than the processing of the jobs by the 10 servers/...
2
votes
0
answers
2k
views
Laravel Horizon Jobs Stuck At Pending After Processing Few Jobs
I'm dispatching a lot of jobs (same class, same code) in a batch in Horizon queue.
After dispatching, some jobs process normally and the rest of the jobs gets stuck at "Pending".
[2022-04-05 ...
0
votes
1
answer
716
views
Can I modify a failed Laravel (redis/horizon) job payload before retrying?
Locally, I use the database queue driver, but on production, we use Redis with Horizon.
Recently, I noticed a job failed due to a tiny issue in the payload (a single character). I'd really like to ...
4
votes
0
answers
2k
views
Laravel horizon processing jobs but not visible
I'm using Laravel forge and have setup Horizon for processing jobs.
The jobs are being processed I can see that in the forge logs. However, the jobs are not visible in my horizon dashboard. I can see ...
3
votes
1
answer
7k
views
Laravel horizon not processing jobs
I install laravel horizon on a laravel 5.7 project and config it like this:
'domain' => null,
'path' => 'horizon',
'use' => 'default',
'prefix' => env('HORIZON_PREFIX', '...
1
vote
0
answers
290
views
Redis Throttling / Jobs MaxAttemptsExceededException
I need to make 2 calls to a 3rd party API for about 350K products (EANs). The limit for this API is 1200 requests/hourly. I currently use the following code to throttle to jobs according to the 3rd ...
2
votes
0
answers
175
views
How to handle MaxAttemptsExceededException in laravel
Laravel queue will throw MaxAttemptsExceededException when job will take a long time.
I want to handle this exception and do some stuff when this error occurs.
I tries to catch it in handle method but ...
1
vote
1
answer
2k
views
Laravel Horizon - Jobs getting stucked
we're using Laravel 8.x and we've just switched our queue driver from database to redis/horizon. Now we're getting some strange behavior with some jobs.
The Job itself does converting stuff over some ...
0
votes
2
answers
3k
views
Laravel Websockets with separate servers
I'm trying to implement Laravel Websockets with multiple servers.
I have an App server and a Queue Worker server running. I tried to broadcast my notifications from the Queue Worker server but I'm ...
1
vote
3
answers
3k
views
Laravel batch jobs stuck in horizon
I'm having some trouble with batch jobs and Horizon, I created a simple job as proof of concept that only performs a sleep(3) operation.
Then using the relatively new feature of Laravel Queue Batches ...
0
votes
2
answers
491
views
RelationNotFoundException error only in laravel dispatched jobs
I have a very strange error in laravel 7 where I have defined a hasOne relationship in the User Model called user_badge
public function userBadge()
{
return $this->hasOne(UserBadge::class, 'id',...
1
vote
0
answers
202
views
"Class view does not exist" leading to HTTP 500 are *sometimes* triggered when starting a Docker container with Laravel
We are running Laravel under a Docker container whose entrypoint (startup script) is the following:
chmod a+w -R storage \
bootstrap/cache \
public/img
php artisan storage:...