Troubleshooting performance issues
Edit on GitHubThis section helps you optimize the performance of your website by helping you detect and fix the most common performance troubleshooting issues.
Performance optimization has to start with the analysis or with the profiling.
Prerequisites
Before you start optimizing performance, make sure the following preconditions are met:
- You know and understand the problem. An example of a poorly defined problem: “Website is slow“. An example of a well-defined problem: “Web site is slow when I place an order with 25 products of the same SKU (SKU=001). URL: {URL} Credentials: {Instruction on how to get credentials}.”
If you do not have this information, then request additional data from the person who reported the problem.
- Check the profiling. You are free to choose any profiling tool you want. The ones that we prefer are New Relic and Blackfire.
New Relic
To profile with New Relic, do the following:
-
Check if the necessary profiling exists. If it does not exist, reproduce the problem in the necessary environment or request it to be reproduced by the customer. Note the following:
- It takes some time for the New Relic to show the profiling.
- If the request is not meeting the criteria, it will not appear in New Relic. Read more on the official New Relic website.
-
Review the profiling. For example, if the problem is with “place-order“ with 25 product items, do the following:
-
Check if you have profiling for the necessary action in New Relic:
-
Go to Transactions.
-
Select the necessary time period on the top right side.
-
Select the necessary transaction type—for example, Web.
-
In Sort By, select how you want to sort the items—for example, Most time consuming.
-
Check if you have the necessary action “place-order“ in the resulting list. Click See transaction table if needed.
If you have some problems with transaction grouping, check New Relic transactions grouping by queue names.
- Repeat for other sections, like Databases, External services, etc.
For more details, see the official New Relic website.
Blackfire
To profile with Blacfire, do the following:
- Install and configure Blackfire.
- Reproduce the problem in the necessary environment or request it to be reproduced by the customer. For more details on profiling with Blackfire, see the official Blackfire website.
- Review the profiling:
- Check the Recommendations section. It shows some possible solutions.
- Check Callgraph. The left part shows time (excl., incl., calls), and the right part show the exact graph:
Blackfire groups some actions, so after each round of optimization, you will see more details in the report.
- Check other sections, like SQL, Propagation, etc. Read more about profiling with Blackfire on the Blackfire official documentation.
Next steps
- Check that you have the latest performance releases.
- Check that you implemented the performance recommendations.
- If your problem is still not solved, analyze profiling as follows:
- Select the longest action under profiling.
- Optimize.
- Repeat.
- Check if your result is still good for future growth. Return to the previous step if needed.
- Share your experience:
- Contribute to public documentation.
- Share it with Spryker Community.
Thank you!
For submitting the form