0

I am working on a new Magento 2 website. Everything is fine on our test server, but now that we want to move it to the main server, the checkout update scripts are too slow. It takes around 10 seconds to update the cart on every change (such as payment method, shipping method, etc). I have checked the Network tab in Chrome developer tools, the problem seems to be from huge TTFB of every request:

set-payment-information : 6.7s

updatePaymentMethodPost : 10+s

totals-information : 9s

Even "add to cart" process takes a long time too (5-6s).

The page load time is fine and it is under 3 seconds. Cache and Redis are enabled and It is in production mode. This might be caused by a server misconfiguration, but I can not find it out. Any help is higly apprecieated.

Checkout Request Timing

enter image description here

3
  • Check by disabling emails as on times sending emails will block or slow down due to configuration. Commented Nov 14, 2021 at 18:02
  • Thank you. The email was not the problem, we switched to another server with NVMe drive and the problem solved. Commented Nov 16, 2021 at 7:48
  • Good to know that issue was resolved.. Yes SSD drives with NVMe are recommeded for faster IOPs Commented Nov 17, 2021 at 1:28

1 Answer 1

0

Do the following : log Mysql queries with PHP stack : bin/magento --include-all-queries=true --include-call-stack=true dev:query-log:enable then : var/debug/db.log you will find log.

Look at the sql queries that were executed but of no use( should be related to inventory, indexer etc ).

disable modules or change there XML so that they are not a part of checkout page. configure inventory related options to reduce inventory related sql queries. clear Mysql tables for abandon cart related queries. Check if indexers queries are there and if possible move then from save to schedule. update community modules if they are taking resources.

In parallel make sure that cron are not taking extra resources which will be the case if crons are not configured as per site requirement.

Server aspect : SSD with NVMe technology. sufficient IOPs

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.