-
Notifications
You must be signed in to change notification settings - Fork 130
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
Exceptions in failed Jobs running in queue worker aren't reported to bugsnag. #535
Comments
Apologies for the delay in response. We would expect these exceptions to be reported without needing to define a As this is a public thread, please feel free to share any additional details with us directly by contacting support@bugsnag.com. |
Hi @mclack Thanks for the reply. I do not have any discard rules set. Could you refer me to the block of code in this repo that has the logic to deal a failure inside a Job to be reported to bugsnag? As you know laravel is catching exceptions inside the queue worker and just calling the failed method, and emitting some events, but I don't think you are listening to any of those events. If you could refer me to those code where the logic for dealing with failed jobs in the queue worker is implemented that would be very helpful, thanks! |
Thank you for confirming. You can find more information on the handling of unhandled errors in this repo here. We believe instances of the errors you have highlighted should be captured and we do have test fixtures in place to test against such a case (here & here). However, for further investigation would it be possible for you to reproduce this issue and try sending these errors to an external webhook? Alternatively, if you could also share any error logging received based off of this unhandled crash inside a job. As this is a public forum, please feel free to reach out to us at support@bugsnag.com to share this additional information. |
As this thread has not seen any activity for some time I am going to close this issue out. |
Describe the bug
If there is an exception in a Job running through the laravel queue worker, and the job fails after the max tried attempts due to the exception, the exception is not reported to bugsnag. This is due to the queue worker being a long lived process that catches exceptions if they occur.
The only way to report these errors is to define in every Job a
failed
method and report the exception there.However this is tedious to do for every Job. There should at least be an option in bugsnag to report failed job exceptions.
FYI: I also have to set
Bugsnag::setBatchSending(false)
in AppServiceProvider so the exception can be reported since queue worker does not exit on its own.Steps to reproduce
php artisan queue:work
)Environment
The text was updated successfully, but these errors were encountered: