This article provides troubleshooting steps for when you receive a Redis memory critical alert for Magento Commerce in New Relic. Immediate action is required to resolve the issue. The alert will look something like the following, depending on the alert notification channel you selected.
Affected products and versions
All versions of Magento Commerce Cloud Pro.
You will receive an alert in New Relic if you have signed up to Managed alerts for Magento Commerce and one or more of the alert thresholds have been surpassed. These alerts were developed by Magento to give customers a standard set of alerts using insights from Support and Engineering.
- 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 refer to Installation Guide > Enable or disable maintenance mode in Magento Developer Documentation. 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, refer to Maintain the list of exempt IP addresses in Magento Developer Documentation.
- 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., major action in Magento Admin such as data imports / exports, flushing media, saving categories with a great number of assigned products, and mass updates).
- Clear your cache.
Follow these steps to identify and troubleshoot the cause.
Because this is a critical alert, it is highly recommended you complete Step 1 before you try to troubleshoot the issue (Step 2 onwards).
- Check if a Magento support ticket exists. For steps, refer to KB Track your support tickets. 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:
- If no support ticket exists check if Redis Used Memory is increasing or decreasing by going to one.newrelic.com > Infrastructure > Third-party services page, select the Redis dashboard. If it is stable or increasing, submit a support ticket to have your cluster upsized, or increase the
maxmemorylimit to the next level.
- If you cannot identify the cause of increased Redis 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.
- Check for misbehaving third party extensions:
- Try to find a correlation with recently installed third party extensions and the time the issue started.
- Review extensions which potentially could affect the Magento cache and cause the cache to grow quickly. For example, custom layout blocks, overriding cache functionality, and storing large amounts of data in cache.
- If there is no evidence of misbehaving extensions, Install latest patches to fix Redis issues for Magento Commerce Cloud.
- If the above steps do not help you identify or troubleshoot the source of the issue, consider enabling L2 cache to reduce network traffic between the app and Redis. For general information on what is L2 cache, refer to L2 caching in the Magento application. To enable L2 cache for Cloud, try the following:
- Upgrade ECE Tools if below 2002.1.2 version.
- Configure L2 Cache by using Use REDIS_BACKEND variable and updating
stage: deploy: REDIS_BACKEND: '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache'