How can I find out more about why my unsuccessful launch of Laravel failed?

Situation

I use Laravel Queues to process a large number of media files, it is expected that a separate operation will take minutes (let's just say up to an hour).

I use Supervisor to start my queue, and I start 20 processes at a time. My supervisor configuration file is as follows:

[program:duplitron-worker] process_name=%(program_name)s_%(process_num)02d command=php /var/www/duplitron/artisan queue:listen database --timeout=0 --memory=500 --tries=1 autostart=true autorestart=true user=duplitron numprocs=20 redirect_stderr=true stdout_logfile=/var/www/duplitron/storage/logs/duplitron-worker.log 

In my duplitron-worker.log I noticed that Failed: Illuminate\Queue\ CallQueuedHandler@call happens sometimes, and I would like to better understand what exactly is happening. Nothing appears in my laravel.log file (where exceptions usually appear).

Question

Do I have a convenient way to learn more about what leads to my work?

+8
source share
3 answers

In newer versions of Laravel, there is an exception table in the failed_jobs table that contains all the necessary information. Thanks to cdarken and Toskan for pointing this out!

==== OLD METHOD BELOW

This is what I always do, but first - make sure you have a table with errors! This is well documented, see this :)

  1. Run the php artisan queue:failed command to get a list of all failed jobs, and select the one you need. Write down the ID.

  2. Then be sure to stop the queue with supervisorctl stop all duplitron-worker:

  3. Finally, make sure your APP_DEBUG parameter for APP_DEBUG = true.

  4. Then run php artisan queue:retry {step_job_1_id}

  5. Now manually run php artisan queue:listen --timeout=XXX

If the error is structural (and most of them), you should get an error with a debug stack in the log file.

Good luck with debugging :-)

+19
source

as @cdarken pointed out, an exception can be found in the exception the failed_jobs database table column failed_jobs . Thanks @cdarken I would like his answer to be a response, not a comment.

+1
source

Worked for me, at vendor / laravel / framework / src / Illuminate / Notifications / SendQueuedNotifications.php Just delete "use Illuminate \ Queue \ SerializesModels;" Line 6 and change line 11 to "use queueable;"

0
source

All Articles