Drush is a command-line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those who spend their working hours hacking away at the command prompt.
The same queue is processed with cron without out of memory errors, the queue has around 1000 items.
Workaround
I implemented processing in batches, something like:
$site_alias = $this->siteAliasManager()->getSelf();
$process = $this->processManager()->drush($site_alias, QueueCommands::RUN, ['some_queue_name']);
do {
// Enqueue a batch of items.
$this->someEnqueuer->enqueueBatch($sandbox);
// Process queue.
$process->run($process->showRealtime()->hideStdout());
}
} while (!$this->someEnqueuer->someIsFinishedMethod());
Describe the bug This happens when invoking a Drush process from a drush command:
The same queue is processed with cron without out of memory errors, the queue has around 1000 items.
Workaround I implemented processing in batches, something like: