Laravel 7 run queue:listen from route on shared hosting Rent yourself a VPS and avoid these issues.
create a secret route that runs the artisan command php artisan queue:work --stop-when-empty
hit it every minute with cpanel cron
when I hit the route the server crashes and resumes within a minute even without cron job. @snapey
your shared hosting 'crashes' ?
Anything in the Laravel log files?
bear in mind that when you hit the route, you will get no response, and the request will not complete until the queue is empty.
@wahidulalam please elaborate server crashes, how do you know it crash?
shows : proc_open(): fork failed - Resource temporarily unavailable when hit this Route::get('/job', function () { Artisan::call('queue:listen'); return 'Job Started....'; }); @snapey
@sinnbeck I am trying to discuss with provider. I am wondering if it is possible in shared hosting as many people told me its not possible in the shared hosting and suggested to get VPS??
Please sign in or create an account to participate in this conversation.