Open Orrison opened 3 months ago
@SimplyCorey tagging for visibility. Seeing this error thousands of times now. Do you have any insight into what could be happening here?
@Orrison Sorry, I didn't see this. Is this happening for a single type of job or is it random? What version of Laravel are you using?
@SimplyCorey no problem! It is difficult to tell as the error makes it hard to track down exactly which job this is failing for. After some observation, it seems to be throwing this error for a job triggered by a queued listener in this package: https://github.com/owen-it/laravel-auditing/blob/master/src/Listeners/ProcessDispatchAudit.php
We are using Laravel v10.48.20
Hey @SimplyCorey I just wanted to let you know that I figured this one out. It turns out the issue was between our usage of your package and https://github.com/spatie/laravel-multitenancy, where we are switching the filesystem root per Tenant. So a job gets dispatched and puts the payload in the tenant's root in S3, but then when your package tries to load the payload, it fails to find it, as that happens before tenant switching where the root would be corrected.
So in our project I am now overriding a few of your classes and mingling in some Multitenancy things to do the Tenant finding and switching right after the item is popped out of the queue.
I of course understand that this is probably way out of the scope of your package, so we are fine maintaining our overrides. But if you are at all interested in discussing working this fix, or something like it, directly into the package just let me know and I would be more than happy to work with you on it.
Our project is source available, so you can see the PR here: https://github.com/canyongbs/advisingapp/pull/1104
What happened?
We are seeing some random errors due to issues with
DefectiveCode\LaravelSqsExtended\SqsDiskJob::$cachedRawBody
. Details below:This seems to happen out of nowhere as the queue is running.
How to reproduce the bug
It seems difficult to reproduce. It just seems to happen randomly while the queue is running.
Package Version
1.0.0
PHP Version
8.2.0
Which operating systems does with happen with?
Linux
Notes
No response