Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Drush Queue Run All

29 sites Security covered
View on drupal.org

This module provides a Drush command to process all queued items on your website. It allows for limits on time, items, and memory, and can run in daemon mode for continuous processing.

This module adds a Drush command that allows you to process all available queues in the website.

This originally started as a PR for Drush, but it was decided to (initially) let this command live in contrib.

Features

This module adds a drush queue:run-all command that does the same as drush queue:run, but for all available queues instead of a specific one. It takes the same options, but without the argument. The --time-limit and --items-limit options count across all queues instead of a specific queue.

The command has a --memory-limit option that takes either a number that ends with g/m/k (the same format as the memory_limit ini setting) or a percentage. The command will run until that amount of memory is consumed.

The command also has a --daemon option that keeps the command running until --items-limit, --lease-limit or --memory-limit is reached - if defined. Else, it keeps going indefinitely.

Usage with process managers

When used with a process manager like systemd, RoadRunner or Supervisord, it can be set up as a process that runs permanently and restarts automatically in case of failure. This is useful when you need queue items to be processed as fast as possible, instead of during every cron run.

Make sure to restart queue runners after deploying new code, otherwise the old code will keep running in memory until the queue runner is restarted. This can cause some very hard to debug issues. Trust me, I've been there.

Here are some example configurations to be used with different process managers. You will need to adjust things like the path to the PHP and Drush executables and the options passed to the command according to your setup and preferences.

systemd

[Unit]
Description=Queue runner
After=mysqld.service
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
RestartSec=1
ExecStart=/usr/bin/php %h/deploy/current/vendor/bin/drush queue:run-all --daemon --memory-limit=60%

[Install]
WantedBy=default.target

Supervisord

[program:queue_runner]
    command=/usr/bin/php vendor/bin/drush queue:run-all --daemon --memory-limit=200M
    redirect_stderr=true
    autostart=true
    autorestart=true
    user=<your user>
    numprocs=1
    directory=/home/deploy/current
    process_name=%(program_name)s_%(process_num)s

Known issues

Under heavy concurrency, the queue database table can suffer from SQLSTATE[40001]: Serialization failure: 1213 Deadlock found errors. This is not an issue with this module, but rather with Drupal core. More information and a working patch can be found in #3555806

Activity

Total releases
5
First release
Jan 2025
Latest release
5 months ago
Releases (12 mo)
2 ▼ from 3
Maintenance
Active

Release Timeline

Releases

Version Type Release date
1.1.1 Stable Jan 30, 2026
1.1.0 Stable Oct 8, 2025
1.0.1 Stable Jun 12, 2025
1.0.0 Stable Jan 17, 2025
1.0.x-dev Dev Jan 17, 2025