Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x] Fixes jobs saying "pending" forever #1349

Merged
merged 12 commits into from
May 24, 2023
Merged

Conversation

nunomaduro
Copy link
Member

@nunomaduro nunomaduro commented May 24, 2023

This pull request fixes the "pending" job status (#1331, #1113, #577, #507, #543, #690, #503, #411), by simply delaying the "failed" updates to performed a few seconds after via queued job.

@nunomaduro nunomaduro marked this pull request as ready for review May 24, 2023 16:17
@nunomaduro nunomaduro requested a review from taylorotwell May 24, 2023 16:17
@nunomaduro nunomaduro changed the title [4.x] Fixes "pending" job status [4.x] Fixes jobs saying "pending" forever May 24, 2023
@taylorotwell taylorotwell merged commit 9bbfc8f into 4.x May 24, 2023
@taylorotwell taylorotwell deleted the fix/pending-job-status branch May 24, 2023 18:57
@malohtie
Copy link

malohtie commented Jun 6, 2023

@nunomaduro is it normal to see a lot of this queue jobs from this class ?
image

@nunomaduro
Copy link
Member Author

@malohtie Yes, I am assuming you have an even bigger number of 'other' queued jobs, right?

@malohtie
Copy link

malohtie commented Jun 7, 2023

@nunomaduro yes a lot

image

@nunomaduro
Copy link
Member Author

So that number of "ProcessPendingUpdates" is expected, as some of your queued job jobs are being finished before even you insert them in telescope.

@peterpan666
Copy link

I'm seeing these jobs dispatched to the default queue too. What does it do ? In what case is it dispatched ? I can't find any documentation about it.

@shatterproof
Copy link

FYI this is a very noisy job so it is a good candidate for silencing in the horizon.php config file. You can do this by adding Laravel\Telescope\Jobs\ProcessPendingUpdates::class to the silenced array there. This will keep it out of the Completed Jobs list in Horizon.

@peterpan666
Copy link

Hi and thanks for your reply but I don't use Horizon.

To me the problem is that an undocumented job is dispatched on an unconfigurable queue, to do I don't know what or when.

I'm not sure how should I handle it at this time and why should I handle it.

@shatterproof
Copy link

I agree with you, I think this could be handled better. Was just offering a temporary solution while using Horizon to remove the many jobs from the completed list there.

@lucaspanik
Copy link

@nunomaduro

Could this PR be a possible solution to this problem on the horizon?
laravel/horizon#1034

@mikedodd
Copy link

mikedodd commented Jul 21, 2023

This is making millions of jobs for me, my default queue has gone from 2 threads to 30, just to keep up.

all jobs have specific queues in Horizon and so this is all to handle this patch.

I can ignore them from the completed queue in horizon but it will still be running 30 threads just for this job.

If you update the config (config/telescope.php) to set this as false, it will stop the job running and you can use Horizon for monitoring the jobs
Watchers\JobWatcher::class => env('TELESCOPE_JOB_WATCHER', false),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants