ostark / craft-async-queue

Async Queue Handler for Craft 3 and 4
MIT License
93 stars 7 forks source link

Could not acquire mutex lock for the queue (queue) #51

Closed tekstrand closed 2 years ago

tekstrand commented 2 years ago

We've been seeing issues, especially when running FeedMe feeds, related to Mutex. For a while we thought it was related to https://github.com/craftcms/cms/issues/10189 but have since stood up Redis and enabled it as the mutex driver for our app. We continued to see issues, and finally thought of disabling async queue. Now that we've done so, the errors are gone and tasks complete successfully.

Please let us know if there's anything additional we can provide to help!

Uncaught exception 'yii\base\Exception' with message 'Could not acquire a mutex lock for the queue (queue).' in /opt/app/vendor/craftcms/cms/src/queue/Queue.php:780

ostark commented 2 years ago

@tekstrand do you experience the issue with this ENV var set?

ASYNC_QUEUE_CONCURRENCY=1
tekstrand commented 2 years ago

We ended up spinning up a background container which doesn't serve any traffic to just run queue/watch and that has solved the issue. Didn't bother messing with the concurrency once we did that.