This article provides troubleshooting steps when you receive MariaDB alerts for Magento Commerce in New Relic. The MariaDB alerts monitor high query load as well as excessive Data Manipulation Language (DML) queries. Both can lead to a degraded user experience or even downtime. You can receive four kinds of alerts:
- DML Queries Warning
- DML Queries Critical
Affected products and versions
Magento Commerce Cloud Pro
You will receive a managed 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 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 DevDocs Installation Guide > Enable or disable maintenance mode . 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 DevDocs Maintain the list of exempt IP addresses .
- End any scripts such as imports that may be the cause of the alert if site performance is impacted.
- Run indexers or additional crons which may cause additional stress on MariaDB.
- Do any major administrative tasks (i.e., Magento Admin, data imports / exports).
- Clear your cache.
DML Queries (queries that modify the database using UPDATE, INSERT, and DELETE)
If you receive a DML Queries Critical alert start at step one. If you receive a DML Queries Warning alert start at step two.
- Check if a Magento support ticket exists. For steps, refer to KB Track your support tickets . Support may have 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 MariaDB alert received".
- Description of the alert.
To identify the source of the issue, try to identify the DML queries:
- Review your database operations by using steps from New Relic APM UI Pages > Monitoring > Databases page .
- Sort by CALL COUNT, then OPERATION. Review INSERT, DELETE, and UPDATE operations.
- Look for high AVG.
Click through to find database operation callers. This will identify transactions using that query by time.
Seek out either code optimizations, or operational optimizations:
- Code optimizations: Look to optimize queries with bulk inserts / updates, minimizing index usage, or throttling code.
- Operational optimizations: Offload resource intensive data modifications to lower traffic times.
- Additional optimizations: Ensure that you are on the latest version of ECE-Tools. For steps, refer to DevDocs Magento Commerce Cloud > Update ece-tools version .
- To research other common MariaDB issues, refer to Most common database issues in Magento Commerce Cloud .
- To research database best practices, refer to Database best practices for Magento Commerce Cloud .