I'd like to ask a technical question about PlaceOrder function.
The "PlaceOrder" response time is currently over 20 seconds.
(for both REST API and GRAPHQL endpoints)
It only takes around 4 seconds if an order is placed on the default store,
but takes around 15-20 seconds or more if placed from the added stores.
Would you please give me advice on what the cause may be and also how I can optimize the response/solve the issue?
Thank you.
Magento Version 2.4.3 (Multi store setup)
Mariadb 10.3.31
Apache 2.4.46 (Unix)
Hello @tsutsumipo8233
The response time for the "PlaceOrder" process in Magento 2 can be influenced by various factors. Here are a few possible reasons for the extended response time:
If you find our reply helpful, please give us kudos.
A Leading Magento Development Agency That Delivers Powerful Results, Innovation, and Secure Digital Transformation.
WebDesk Solution Support Team
Get a Free Quote | | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789
Thank You,
WebDesk Solution Support Team
Get a Free Quote | Email | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789
Location: 150 King St. W. Toronto, ON M5H 1J9
There are a few potential causes and optimizations to improve the slow PlaceOrder response time for additional stores in your Magento 2.4.3 multi-store setup:
- Check for third party module conflicts - disable any unnecessary checkout related modules and test. Some may impact order creation performance.
- Review database indexes, especially around sales_order and related tables. Missing indexes can slow searches/inserts.
- Enable Magento's order management splitting to segment stores into separate DBs. This prevents resource contention.
- Check for excessive customizations to PlaceOrder logic - heavy custom code can bog down order creation.
- Profile the PlaceOrder dispatch process to identify specific bottlenecks in the code execution.
- Configure caching for API requests to reduce duplicate orderCalculations.
- Optimize database configuration - ensure adequate connections, optimal innodb settings, etc.
- Rule out web server delays - try placing the order via CLI to isolate slowness to just Magento.
- Upgrade to latest version of PHP and MySQL for performance gains.
Start with reviewing customizations and database optimizations first.