Craft CMS queue jobs
Craft CMS uses queue jobs for long-running tasks. By default these jobs are processed by a web based ajax call which blocks PHP processes that are meant for site delivery. In the worst case scenario the queue runner consumes all PHP resources. Luckily there are more robust solutions available.
The most common use case is image transformations.
# Worker jobs
Run long running processes in a isolated environment without hurting site delivery. The jobs component allows you to create a worker job to run in the background.
- Make sure the jobs component is booked
- Set up a job with this Craft command:
php craft queue/listen -v - Remove
runQueueAutomaticallyfromconfig/general.phpto disable the standard queue
# Alternatives
Another approach is to use a poor mans worker: The Async Queue plugin from our co-founder Oliver is just that. For many queue workloads the ostark/craft-async-queue plugin can mitigate performance problems without the need of an extra component and further configuration.