459 questions
0
votes
1
answer
134
views
Confusions with how Laravel's Job serialization and deserialization works
What happens to the model's eager-loaded relationship when the model is passed to another Job's dispatch method?
Context:
There is a job that retrieves all ongoing games and this job should create an ...
1
vote
1
answer
145
views
How to ensure chained Laravel jobs run on the same server in a multi-worker setup?
In my Laravel project, I have 5–6 different queues. Each queue triggers the next one in a strict order, forming a processing chain like:
Job1 → Job2 → Job3 → Job4 → Job5
The flow is always triggered ...
0
votes
0
answers
41
views
multiple amazon sqs queues with laravel
I have setup two queues (calculator-webhook-queue & offers-queue) on Amazon SQS with the following code:-
In .env file
QUEUE_CONNECTION=sqs
AWS_DEFAULT_REGION=us-east-1
AWS_ACCESS_KEY_ID=*******
...
0
votes
1
answer
54
views
Already moved, failed job get still processed in background
I'am working currently on a Laravel project which uses a big pipeline inside a single job. Inside that pipeline different third-party API calls are made and the results get written in a simple MariaDB....
0
votes
3
answers
149
views
Laravel 11.x Queue chain functions
I'am using Laravel 11.x as Framework and currently trying to figure out "the best" way to handle a big process from the amazon sp-api. I want to handle the API Requests within Jobs and want ...
1
vote
0
answers
70
views
Laravel queue/jobs is looking at the wrong database when job fails to record it
the queue can read the jobs table and find the right database.
However, when the job fails, it defaults to the connection database.sqlite, which is wrong.
I am getting this error -- database file at ...
0
votes
0
answers
110
views
Laravel 5.5 Job Queue Not Working In Parallel Despite Having Many Workers
I'm using Laravel 5.5 with the database queue driver to manage jobs, and I have 5 workers running. However, I've noticed that the rate at which jobs are processed remains constant at 100 jobs per ...
1
vote
1
answer
176
views
Trigger Laravel queue from Python application
I want to send a Laravel queue job from a Python app. How this can be achievable?
1
vote
1
answer
863
views
Unable to add jobs to Bus Batch in Laravel
I am unable to add jobs to Bus Batch in Laravel in a foreach loop, and get the error Call to undefined method App\Jobs\ProcessSitemapChunk::withBatchId().
$sitemapUrl = 'someurl';
$...
0
votes
1
answer
102
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
2k
views
Laravel - Job has been attempted too many times
To anyone using Laravel Jobs and Horizon. Sometimes, after the job succeed, the queue tries it again with no reason:
App\Jobs\Job has been attempted too many times. {"exception":"[...
1
vote
1
answer
226
views
Laravel Scout w/ Meilisearch and Redis queue import fails when queue=true
When I run
sail php artisan scout:import "App\Models\Persona"
with queue=false, everything works fine, and I've confirmed searches return results.
But when I turn on the queue and run the ...
0
votes
1
answer
282
views
How to send laravel 10 fortify reset password email via database queue system?
I have Laravel 10 as my API backend with Fortify. When resetting the password, I want to send HTML content (retrieved from the database) to an email. The email should be queued, possibly via the jobs ...
0
votes
1
answer
241
views
Job timeout and excessive attempt issues
I'm working with a job with a timeout set to 21600 seconds. However, when the execution time exceeds this limit, I encounter an error message stating:
App\Jobs\JobName has been attempted too many ...
1
vote
1
answer
1k
views
Laravel | Laravel Queue Job Is Not Being Processed
I have dispatched a job and the the job is added to the database on the specified table, e.g. "Jobs. The jobs are not being processed, even though the jobs are added to the database. No log ...
1
vote
0
answers
283
views
Laravel Job Batches - deadlock
I have a chain of two batches. One to prepare stuff and one to execute it. I had a lot of issues with it in the database, but I moved it to redis and it's perfect now.
However, the jobs are quite fast ...
0
votes
1
answer
165
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
1
answer
158
views
Laravel Jobs: File created in job won't delete till queue has stopped
I am creating a temporary file in a Laravel Job which I want to delete later in the same job. However, the file does not seem to delete until the entire queue worker has been stopped. The file is ...
0
votes
1
answer
677
views
How to avoid timeout when running time consuming jobs in Laravel
In my laravel application i do a form submit to execute a time consuming task by calling shell_exec(my_time_conusming_Script.sh) . The process executes successfully on the background. But the ...
3
votes
0
answers
172
views
Redis queued jobs are failing randomly due to Illuminate\Database\Eloquent\ModelNotFoundException · No query results for model
Recently after moving our queue driver to 'redis' we are facing more issue with some jobs/event listeners in the 'default' queue getting failed. At this time of failing, its also not getting inserted ...
0
votes
1
answer
507
views
Laravel failed job is not retrying
I have a job that has public $tries = 2; but when it fails, it does not retry. In Horizon, I have to retry the job manually.
Here is the job:
class SendEmailMessage implements ShouldQueue
{
use ...
1
vote
1
answer
237
views
Laravel 10 everySecond Method doesn't work as expected
According to laravel 10 documentation, we can use other sub-minute time constraints (everySecond, everyTwoSeconds, etc) for intervals lesser than one minute; but none of the sub-minute seems to be ...
1
vote
1
answer
1k
views
How to make supervisor work outside docker container for Laravel queue:worker
There's a lot of questions like this, feel like I've read them all and I'm no wiser.
Like everyone else I'm trying to have supervisor manage my Laravel queue for queued notifications.
If I'm outside ...
1
vote
0
answers
164
views
SQLSTATE[HY000]: General error: 1364 Field 'model_type' doesn't have a default value (Connection: mysql, SQL: insert into `media`
I am using these two packages:
"maatwebsite/excel": "^3.1",
"spatie/laravel-medialibrary": "^10.0.0",
I'm importing an Excel sheet with queuing and when a cell ...
1
vote
1
answer
1k
views
Why some of my laravel queue jobs are executing twice and update balances in database twice?
I am using laravel 8 for my application and every is working fine except sometimes my queue jobs are running twice which is causing database ledger balance to update twice .
I found out this issue ...
-1
votes
1
answer
358
views
Laravel Queue : Class Illuminate\Bus\Dispatcher contains 3 abstract methods and must therefore be declared abstract or implement the remaining methods
I was trying to add Queue to one of my existing Laravel projects. I have tried different tutorials related to queuing in Laravel such as this. I have created a fresh Laravel project and tried this and ...
0
votes
1
answer
857
views
Laravel Queue::fake() should be at the top of our tests?
It's a very simple question, I had this test:
public function test_expired_cases_empty_dont_dispatch_update_expired_class()
{
$this->expired1->created_at = Carbon::now();
$this->...
0
votes
1
answer
958
views
How to prevent concurrent processing of a particular job in laravel?
I'm currently implementing a wallet top-up system for an application. I'm using a job called AdjustWalletBalance to handle this. What the job simply does is to read the client's current wallet balance ...
1
vote
1
answer
280
views
In laravel how can i start all my queue using single artisan command
I have a large number of users hence I have to do that particular user has their queue not just one queue for all users. php artisan queue:work this command runs only default named queue. but in my ...
0
votes
1
answer
262
views
Export table to Excel using Laravel queue gives empty file
I have configured Laravel queue with horizon and everything is working perfectly, but when I start exporting the file, the horizon shows completed job while it gives me empty Excel file with 6kb in ...
0
votes
0
answers
52
views
how to get selected options belongs to product
Thank you all in advance ,
i have peoject for ecommerce app
please check simplified DB schema for better unsrstand
products
- id
- name
- some other columns ...
product_items
- id
- product_id
- some ...
1
vote
0
answers
29
views
Typed property ... must not be accessed before initialization in [duplicate]
I'm trying to create a Job for my sitemap generator in Laravel. It should create a job for adding each 100 rows form my Cars model but I'm stuck at one error. As soon as I use sitemap:make command and ...
0
votes
2
answers
955
views
supervisor and queue is not working in horizon
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 ...
0
votes
0
answers
617
views
Laravel - Queue:work running in production but not processing jobs
I have set up a laravel project and want to send emails via the email queue.
I have set up supervisor on the server and started the processes.
However, the whenever I fire a laravel job and try to ...
-1
votes
1
answer
159
views
Laravel Workers - AWS Beanstalkd Instance Termination
I am currently running my Laravel application on AWS Beanstalk with a load balancer configured. The setup allows for a minimum of 1 and a maximum of 2 instances to be running. So far, everything ...
0
votes
1
answer
4k
views
High memory usage with laravel queue
I'm using laravel queue to perform background tasks.
After starting the queue (either with "php artisan queue:work" or with supervisor), htop indicates a memory usage of ~2GB for the process ...
2
votes
2
answers
1k
views
(PhpOffice\\PhpSpreadsheet\\Reader\\Exception(code: 0): Could not find zip member laravel queues job - Laravel
I have application created using Laravel 9.
i have installed 'maatwebsite/excel' library to export and import excel file. it is working good on local and server.
but now i have implemented laravel ...
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
0
answers
133
views
I can't run more than 5 queues in my Laravel project
I have implemented Queues in a Laravel project. Since I can't install Supervisor on my server, I launch the queue:work command for each queue in Plesk panel. It works fine until I exceed 5 queues. The ...
1
vote
0
answers
1k
views
Illuminate\Queue\MaxAttemptsExceededException in Laravel 10 despite setting timeout to be lower than retry_after
I'm using Laravel 10 and PHP 8.1. I have a website monitoring platform which customers can add their websites and they're checked at an interval to see if the sites are up or down. My cron runs every ...
1
vote
1
answer
1k
views
Laravel queues stop or terminates on its own
I have a laravel queue job that process around 10 to 12 seconds before succeeding.
It does not fail though and not throw any error logs.
Only problem is, it just stops processing the next jobs. I have ...
0
votes
0
answers
3k
views
Laravel queues pushing job into batch (and process it) when current job fails
Tried in many different ways but can't get this working, and i'm quite sure it was working until last framework updates (but got no clues diffing source code).
Basically: when a job on a site (A: ...
1
vote
1
answer
1k
views
Laravel Job Queue not saving database changes if one job fails
I have a background job that updates data via models. The issue is that when one of the job fails due to errors/exceptions (even when try/catch is used as long as an exception occurred), the rest of ...
0
votes
1
answer
192
views
Laravel Supervisor - SMTP issue stopping the code even email is sending through queue
I have supervisor installed to run the code using Laravel queue in background
I am using this things to send an email usually and using SMTP to send an email
But whenever there is any issue with SMTP ...
2
votes
0
answers
204
views
Laravel Rate Limiter Release time
I am using a custom rate limiter as per https://laravel.com/docs/10.x/queues#rate-limiting.
// App Service Provider
RateLimiter::for('google-sheets', function (object $job) {
return Limit::...
1
vote
1
answer
1k
views
How to know if bus chain has failed or aborted? laravel
I have my sample code below, the bus is just working fine but I was wondering if it's possible to check if a bus chain has aborted or failed.
I tried assigning a variable but the assignment inside the ...
1
vote
1
answer
1k
views
How can I make the laravel queue retry only failed notification channels instead of retrying the whole notification?
My laravel notification has to send messages to 2 channels. But when one channel failed, both channel was been resending message by queue. Is there anyway to solve this without creating a deferent ...
0
votes
3
answers
3k
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
1
answer
732
views
SFTP disconnect() method not working with Laravel
I'm running the following script inside a Laravel job (OperatorSubmissionJob) to upload multiple files to the SFTP server. Everything working well. But I have to disconnect the SFTP connection to end ...
0
votes
1
answer
1k
views
How to stop a laravel SyncQueue
I've tried queue:clear, even tried removing all jobs but when I add them again the former queue starts working again as evidenced by the timely log entries, I'd just like to start fresh but couldn't ...