#queue more useful error logs on failure

34 messages · Page 1 of 1 (latest)

vast gyro
#

You need to check your error log for when the job was actually attempted.

olive violet
#

I checked laravel.log and it only displays the same message

vast gyro
olive violet
#

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

vast gyro
#

No.

olive violet
#

Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

any of those then?

vast gyro
#

No.

#

Might be better if you just showed the actual job code here.

olive violet
#
        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?...

olive violet
#

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

vast gyro
#

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.

olive violet
#

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

vast gyro
#

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.

olive violet
#

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