1

I built a site on a dev server and the Craft queue worked in that with no extra setup needed. In fact I installed Async Queue Manager because Crafts way was too slow. They both worked fine.

I moved the site to its live server, and the queue is not running. It runs if I manually enter ./craft queue/listen on the command line. When I stop that process it wont process the queue anymore.

Does anyone know why it would not work on this other server? Do I need to do anything special to make it work? I suppose I could run ./craft queue/listen and leave it, but I would need to set it to run on boot. I never did this on the old server.

Thanks

2 Answers 2

2

Make sure that "run queue" is set in general.php also!

<?php
  ...
  return [
    ...
    '*' => [
      'runQueueAutomatically' => true,
    ]
  ]
2
  • No we have it as false because we use a cron script to call queue/run. I know the queue is running because a lot of tasks are running fine. But some of them fail and then build up. Its not as bad as it used to be now we're updated to the latest craft. I think moving cache to file and not database was a big improvement on other issues too. But it still fails for mainly "Updating search indexes". Always a list of failed tasks for that. Commented Mar 25, 2021 at 10:08
  • Thanks for sharing your experience, run queue automatically is frequently disabled for security reasons. Maybe it will be better in Craft 4 Commented Mar 26, 2021 at 16:36
1

You will need to investigate the log files to determine the source of the problem. There should be a storage/logs/queue.log file. This article might be helpful https://nystudio107.com/blog/zen-and-the-art-of-craft-cms-log-file-reading

3
  • ok thanks. if I am honest the craft logging is terrible, its extremely hard to find any issue as it just dumps everything into multiple files. Although the debu toolbar mentioned on that post looks easier, will try it. Commented Sep 12, 2019 at 10:20
  • Its hard to find issues in the logs, its not great. The only thing I can find relating to this, is in the "Available Debug Data" it lists the AJAX Url I think for the job. Its like this mysite.com/index.php?p=flintadmin28h28/actions/queue/… and if you go to this direct it shows the error HTTP 400 – Bad Request – yii\web\BadRequestHttpException Request must accept JSON in response Commented Sep 12, 2019 at 10:33
  • I believe you need to set a header in an AJAX call to fix that error Commented Sep 12, 2019 at 15:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.