Skip to content

Instantly share code, notes, and snippets.

@Sharifur
Created July 31, 2023 17:00
Show Gist options
  • Save Sharifur/6bab01f9062e005b858ac79b629a6c7e to your computer and use it in GitHub Desktop.
Save Sharifur/6bab01f9062e005b858ac79b629a6c7e to your computer and use it in GitHub Desktop.
how to run laravel queue:work command without memory leak in shared hosting
//add this code in app/console/kernel.php file insider schedule method
$schedule->command('queue:work --timeout=60 --tries=1 --once')
->everyMinute()
->withoutOverlapping()
->sendOutputTo(storage_path() . '/logs/queue-jobs.log');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment