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

jeffreyvanrossum's avatar

Best practice using Queue on shared hosting

Hi everyone,

To start of, I know that shared hosting with limited abilities is not best practice in the first place (:-)), but unfortunatly that is the situation I'm dealing with at the moment.

I'm trying to get the queue-system working (using the database) on a shared hosting, and thought I'd do that by adding a command to the kernel class.

$schedule->command('queue:work --tries=3')
            ->cron('* * * * * *')
            ->withoutOverlapping();

Then I have a cron job running every minute to run artisan schedule:run.

This works, but only for a limited amount of time. It then just adds jobs to the queue but they are no longer processed. I know that removing withoutOverlapping might solve it, but that will probably result in memory issues.

Long story short: does someone here have any experience setting up queues in a shared hosting enviroment, and if so, how did you configure it? Any ideas on setting this up are welcome to of course.

0 likes
3 replies
kalemdzievski's avatar

Few questions:

  • How are your workers configured?
  • Are you using supervisord?
  • Maybe they don't restart if they fail?

It would be helpful if u could provide the configuration of the workers.

Please or to participate in this conversation.