#queue more useful error logs on failure
34 messages · Page 1 of 1 (latest)
I checked laravel.log and it only displays the same message
If a job failed then an exception will be logged, and then the job will be pushed back on the queue. If the job is reaches the max attempts threshold, then the exception you’re getting is thrown.
that was my assumption how this should work too, however failed_jobs is filled with maxattemptsexceeded too
would WithoutOverlapping cause some weird anomaly like that, where it doesnt log the error
No.
Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
any of those then?
sleep(5);
in the handle, nothing fancy, just to test it
I know the get is failing
because it's running in sail (diff. localhost)
but I want the error message of it
or does http consume the error somehow while still signaling the job failure?...
interesting, that would mean that the queue jobs wouldnt be marked as failed actually until the retry, let me check
indeed marked as "done" first time around
It’s best to just read through a section of a docs from start to finish instead of trying to guess the parts you think are relevant.
Best case scenario is you find information pertinent to your use case. Worst case is you gain knowledge you can put in your back pocket for when it is pertinent.
I wasn't aware HTTP even had a by default no error policy, since usually stuff like that just throws an exception
though even with ->throw() it doesnt actually log anything, unless the failed() throwable is required to get that message
about to try
and read through the rest of the docs if I misinterpreted that
What URL are you trying to request, and how are you running the queue worker?
Because if you’re trying to request a URL from the same domain you’re running the app, that’s not going to work under Sail. Sail uses the PHP dev server, which is single-threaded.
I guess the others are done immediately because of the withoutoverlapping middleware, but the very first job it picks up shouldnt
ok so it definitely has something to do with the overlapping middleware
if I remove it, it logs the curl error
ok yeah I can still reproduce it interestingly enough
at first all jobs get marked as done (none failed)
then retry happens, all fail, but only maxattempts gets logged
I made sure now that all jobs have a unique eloquent row to refer to too, still didnt fix this weird behavior