Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

wahidulalam's avatar

Laravel 7 run queue:listen from route on shared hosting

0 likes
8 replies
bugsysha's avatar

Rent yourself a VPS and avoid these issues.

Snapey's avatar

create a secret route that runs the artisan command php artisan queue:work --stop-when-empty

hit it every minute with cpanel cron

wahidulalam's avatar

when I hit the route the server crashes and resumes within a minute even without cron job. @snapey

Snapey's avatar

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's avatar

shows : proc_open(): fork failed - Resource temporarily unavailable when hit this Route::get('/job', function () { Artisan::call('queue:listen'); return 'Job Started....'; }); @snapey

wahidulalam's avatar

@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 or to participate in this conversation.