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

Timed out jobs are not reported #1293

Closed
paulandroshchuk opened this issue Jun 30, 2023 · 8 comments
Closed

Timed out jobs are not reported #1293

paulandroshchuk opened this issue Jun 30, 2023 · 8 comments

Comments

@paulandroshchuk
Copy link

paulandroshchuk commented Jun 30, 2023

Horizon Version

5.17.0

Laravel Version

10.14.1

PHP Version

8.2.3

Redis Driver

Predis

Redis Version

7.0.9

Database Driver & Version

MySQL Ver 8.0.32 for macos13.0 on arm64 (Homebrew)

Description

Timed out jobs are not reported. It looks like TimeoutExceededException is thrown but for some reason this particular exception is not reported (laravel.log is empty).

There is a way to actually have it reported: define a failed() method within the job and manually report the exception using the report() helper:

public function failed(\Throwable $e)
{
    report($e);
}

If we don't specify this, the exception is not reported, which I think should be, right?

Other exceptions such as: MaxAttemptsExceededException, etc are reported correctly.

I've submitted a bug-report repository: https://github.com/paulandroshchuk/bug-report
and also made a Loom video showing the behaviour: https://www.loom.com/share/f5c7a487bf61462b950426915b87e8d7

Steps To Reproduce

  1. Pull bug-report repository https://github.com/paulandroshchuk/bug-report
  2. php artisan hey - queue two jobs (or queue the jobs in any other way)
  3. php artisan horizon - run the jobs (they will time out)
  4. Open laravel.log and you'll see only one time out is reported where two jobs timed out. The reported exception is the one that is manually reported; if it was not reported, it would not be inside laravel.log.
@driesvints
Copy link
Member

I'm not sure about this one... would appreciate some help in figuring this one out.

@github-actions
Copy link

github-actions bot commented Jul 6, 2023

Thank you for reporting this issue!

As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.

If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.

Thank you!

@paulandroshchuk
Copy link
Author

I'm not sure about this one... would appreciate some help in figuring this one out.

Were you able to reproduce the same behaviour? Do you think this might be a real bug? If so, I think I can spend more time debugging this.

@driesvints
Copy link
Member

Actually none of those report for me. I'm using your repo.

Screenshot 2023-07-06 at 10 29 02

@paulandroshchuk
Copy link
Author

paulandroshchuk commented Jul 6, 2023

Actually none of those report for me. I'm using your repo.

Screenshot 2023-07-06 at 10 29 02

Interesting they didn't time out. Do you have this extension installed? https://laravel.com/docs/10.x/queues#timeout

CleanShot 2023-07-06 at 11 36 51@2x

@driesvints
Copy link
Member

yep

@driesvints
Copy link
Member

With both errors not being reported I believe this is intentionally. So going to close this sorry.

@hivokas
Copy link
Contributor

hivokas commented Jul 11, 2023

For anybody who finds this issue, I recommend taking a look at laravel/framework#47107 and laravel/framework#47068.

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

No branches or pull requests

4 participants