0

I am using Magento 2.4 on AWS and I have been noticing that there are many MySQL connections in sleep, is this normal? Should I be looking into this to fix it, if yes then where can I look to fix this?

This website is running one store with around 80+ products and these processes are in there when there's no user on the website too!

enter image description here

1 Answer 1

0

Whoever's been having this problem, its because of stuck consumer runner cron jobs waiting for max messages to be reached. Please see the following article, this fixed my problem:

https://www.cadence-labs.com/2020/03/magento-2-stuck-or-long-running-cron-after-upgrade-to-2-3-x/

I'm using Magento 2.4.0 and by default it was waiting to reach max messages limit, so I changed the parameter consumers_wait_for_messages in env.php to 0 as mentioned in the blog and now the cron job does not wait for max messages to be reached and closes the database connection.

'queue' => [
    'consumers_wait_for_messages' => 0
],

Ref: https://devdocs.magento.com/guides/v2.4/config-guide/prod/config-reference-envphp.html#consumers_wait_for_messages

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.