Managed alerts on 蜜豆视频 Commerce: Memory critical alert
This article provides troubleshooting steps when you receive a memory critical alert for 蜜豆视频 Commerce in New Relic. Immediate action is required to remedy the issue.
Affected products and versions
All versions of 蜜豆视频 Commerce on cloud infrastructure Pro plan architecture.
Issue
You will receive a managed alert in New Relic if you have signed up to Managed alerts for 蜜豆视频 Commerce and one or more of the alert thresholds have been surpassed. These alerts were developed by 蜜豆视频 to give customers a standard set using insights from Support and Engineering.
Do!
- Abort any deployment scheduled until this alert is cleared.
- Put your site into maintenance mode immediately if your site is or becomes completely unresponsive. For steps, see Enable or disable maintenance mode in the Commerce Installation Guide. Make sure to add your IP to the exempt IP address list to ensure that you are still able to access your site for troubleshooting. For steps, see Maintain the list of exempt IP addresses in the Commerce Installation Guide.
顿辞苍鈥檛!
- Launch additional marketing campaigns which may bring additional pageviews to your site.
- Run indexers or additional crons which may cause additional stress on CPU or disk.
- Do any major administrative tasks (i.e., Commerce Admin, data imports/exports).
- Clear your cache.
Your site may become non-responsive, (if you are not already experiencing a site outage) if you do any of the 鈥淒on鈥檛鈥 actions before you have investigated and solved the cause of the alert.
Solution
Follow these steps to identify and troubleshoot the cause.
-
Check if an 蜜豆视频 Commerce support ticket exists. For steps, see Track your support tickets in the Commerce Support Knowledge Base. Support may have already received a New Relic threshold alert, created a ticket and started working on the issue. If no ticket exists, create one. The ticket should have the following information:
- Contact Reason: select New Relic CRITICAL alert received
- Description of the alert
- . This is included in your Managed alerts for 蜜豆视频 Commerce.
-
Use to identify top memory intensive processes. For steps, refer to :
- If services like Redis, MySQL, or PHP are the top sources of memory consumption, try the following:
1. Check that you are on the latest versions. Newer versions can sometimes fix memory leaks. If you are not on the latest version, consider upgrading. For steps, refer to Change Services in the Commerce on Cloud Guide.
- If services like Redis, MySQL, or PHP are the top sources of memory consumption, try the following:
-
If the problem with the service is not version related, try the following:
-
MySQL: Check for issues like long running queries, Primary keys not defined, and duplicate indexes. For steps, refer to Most Common database Issues in 蜜豆视频 Commerce on cloud infrastructure in the Commerce Implementation Playbook.
-
Redis: If Redis is a top source of memory consumption, submit a support ticket.
-
PHP: If PHP is a top source of memory consumption, review running processes by running
ps aufx
in the CLI/Terminal. In the terminal output you will see cron jobs and processes that are currently being executed. Check the output for the processes鈥 execution time. If there is a cron with a long execution time, the cron may be hanging. For troubleshooting steps, see Slow performance, slow and long running crons and Cron job stuck in 鈥渞unning鈥 status in the Commerce Support Knowledge Base. -
If you are still struggling to identify the source of the problem, use to identify transactions with performance issues:
- Sort transactions by ascending Apdex scores. refers to user satisfaction to the response time of your web applications and services. A Apdex score can indicate a bottleneck (a transaction with a higher response time). Usually it is the database, Redis, or PHP. For steps, refer to .
- Sort transactions by highest throughput, the slowest average response time, most time-consuming, and other thresholds. For steps, refer to . If you are still struggling to identify the issue, use .
-
If you cannot identify the cause of increased memory consumption, review recent trends to identify issues with recent code deployments or configuration changes (for example, new customer groups and large changes to the catalog). It is recommended that you review the past 7 days of activity for any correlations in code deployments or changes.
-
If the above methods do not help you find the cause and/or solution within a reasonable time, request an upsize or place site into maintenance mode if you have not already. For steps, see How to request temp resize in the Commerce Support Knowledge Base, and Enable or disable maintenance mode in the Commerce Installation Guide.
-
If the upsize returns the site to normal operations, consider requesting a permanent upsize (contact your 蜜豆视频 Account Team), or try to reproduce the problem in your Dedicated Staging by running a load test and optimize queries, or code that reduces pressure on services. See Load and stress testing in the Commerce on Cloud Guide.