0

Magento 2.3.5 site that loads pretty quickly generally, checkout maybe a few seconds to load but that seems par for the course for Magento 2

However, the issue is that after pressing 'Place Order' the loading icon literally shows for 2-3 minutes before loading the success page.

This happens if using OneStepCheckout, the default one page checkout or regular checkout and using Braintree or Cash On Delivery plugin. The only shipping method is 'Free'

What I have noticed is that we get an order confirmation email fairly quickly (15-20 seconds) and then an invoice always arrives exactly 2 minutes after the order confirmation - and it is after this that the success page loads.

We don't need the invoice to be sent automatically, and I guess this is contributing to the excessive load time - is there any way of stopping this?

Any other ideas for what could be causing this ridiculous load time? I've checked debug.log / system.log while it's happening and literally nothing shows

1
  • As further info, there is NO console error and the network tab literally just shows 'pending' for the whole 2-3 minutes until the success page loads
    – freestate
    Apr 29, 2021 at 16:23

2 Answers 2

1

I would suggest inspecting all post-order processes - maybe an integration with a third party takes long, or some lock somewhere stops the process from fully being committed.

I these kind of situations is useful to install a tool which helps with monitoring performance and errors, so i suggest you install newrelic or blackfire in this case and then inspect the reports.

1

So, thanks to Diane's suggestion above, I installed newrelic and observed what was happening.

The 2 minute delay in the process came from:

Laminas\Mail\Transport\Sendmail::mailHandler

and with the help of this answer: Magento 2 send email very very slow

I discovered that it was the exact same server config issue causing the problem here as well.

Checkout now back to normal Magento speeds...

1
  • 1
    glad you sorted this out!
    – Diana
    May 12, 2021 at 10:28

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.