Skip to main content
Metrics type: Key MetricsCategory: Errors

At a glance

Query Error Rate % is the share of statements that the server rejected or failed to complete, expressed as a percentage of total statements over the window. It is the database’s “are queries actually succeeding?” signal, the counterpart to throughput. A healthy production instance runs at a near-zero error rate; even a fraction of a percent of failing queries usually means real customer-facing breakage, because application code rarely sends statements it expects to fail. A sudden climb points to a specific, findable cause: a bad deploy with malformed SQL, a lock-timeout storm, a permissions change, a full disk rejecting writes, or a schema migration colliding with live traffic. As a hero and Alert Rules card it pages the on-call team the moment errors cross the line, because error rate moving is almost always a symptom of something that just changed.

Calculation

The card divides failed statements by total statements over the window:
The denominator is the increase in Questions (client statements) across the five-minute window. The numerator is the increase in the statements that ended in an error: SQL that failed to parse or execute, statements rejected by access control, statements aborted by a lock-wait timeout or deadlock victim selection, and writes rejected because a constraint, a read-only state, or a full disk blocked them. Where performance_schema statement instrumentation is enabled, the engine reads the per-digest error totals for an accurate count; where it is not, it approximates from the relevant global status counters. Two properties define how to read the number:
  1. It is a ratio, so volume matters in both directions. During a traffic trough, a single failing health-check query can read as a high percentage simply because the denominator is tiny. During peak traffic, the same one failure per second disappears into a near-zero rate. The five-minute window smooths the worst of this, but always sanity-check the absolute error count alongside the percentage at low traffic.
  2. It captures rejection, not slowness. A query that takes 30 seconds but returns rows is a success here; it is the slow-query cards’ job, not this one’s. This card fires only when statements actually fail.
The 5m window means both counters are summed over the trailing five minutes, so a brief blip of errors during a deploy does not trip the alert unless it persists, while a genuine error storm crosses 1% and pages.

Worked example

An engineering team ships a release to a service backed by MariaDB 10.6. Snapshot taken on 17 Feb 26 around the deploy at 14:30 GMT. The card jumps from a near-zero baseline to 1.8% and the alert fires at 14:33, three minutes after the deploy. The on-call engineer reads three things:
  1. The timing fingers the deploy. The error rate was flat for hours and stepped up within minutes of the 14:30 release. This is not a slow-building capacity problem; something the deploy changed is rejecting queries. The first move is to look at what changed, not at the server’s resources.
  2. The error class names the cause. Grouping the failing statements by error code (via performance_schema digests or the application’s own logs) shows they are all ER_BAD_FIELD_ERROR, “Unknown column customer_uuid”. The release referenced a column that a migration had not yet added. The application is sending SQL the schema cannot satisfy.
  3. Rollback beats forward-fix here. Because the failing queries are deterministic (every call to the affected endpoint fails), every customer hitting that path sees an error. Rolling back the release restores the previous SQL immediately and drops the error rate back to baseline, buying time to ship the migration and the code together. The team rolls back at 14:41; the card returns to 0.002% by 14:46.
The takeaway: error rate is the deploy team’s smoke detector. When it moves, look first at what changed in the last few minutes, then group the failures by error code to name the cause before touching the server.

Sibling cards

Reconciling against the source

Where to look in MariaDB’s own tooling:
SHOW GLOBAL STATUS LIKE 'Aborted%' and the access-denied counters for the raw error-side totals. SELECT DIGEST_TEXT, SUM_ERRORS, COUNT_STAR FROM performance_schema.events_statements_summary_by_digest WHERE SUM_ERRORS > 0 ORDER BY SUM_ERRORS DESC to see which query shapes are failing and how often (the single most useful query for this card). SHOW GLOBAL STATUS LIKE 'Questions' for the denominator. The error log (log_error) and the application’s own database error logs for the specific error codes and messages behind a spike.
On a managed service, compare against the provider’s error-count or failed-query metric on the managed-database console, and cross-check the provider’s slow-query and error logs. Why our number may legitimately differ from MariaDB’s own view:

Known limitations / FAQs

The error rate spiked at 03:00 when traffic is almost nothing. Real problem? Check the absolute count, not just the percentage. At low traffic the denominator is tiny, so a single failing health-check or monitoring query can read as several percent. If the raw error count is one or two and they are all the same benign statement, it is noise. If the absolute count is genuinely elevated, it is real regardless of the hour. The five-minute window helps, but always sanity-check the numerator at low traffic. How do I find which query is failing? Run the performance_schema.events_statements_summary_by_digest query in the reconcile section, ordered by SUM_ERRORS. It groups failures by normalised query shape and shows the count per shape, so the worst offender surfaces immediately. Then look up the error code in your application logs or the MariaDB error log to get the exact message. This two-step (digest then code) names almost every error spike in minutes. What is the difference between this and Slow-Query Rate? This card counts statements that failed. Slow-Query Rate % counts statements that succeeded but took too long. A query that runs for 40 seconds and returns rows is slow, not an error. The exception is a lock-wait timeout: a statement that waits, then gives up, ends in an error, so it can appear on both cards. Reading them together tells you whether your queries are timing out (slow plus error) or failing outright (error only). Does this include deadlock victims? Yes. When InnoDB detects a deadlock it rolls back one transaction as the victim, which surfaces as an error (ER_LOCK_DEADLOCK) to the application. So a deadlock storm pushes both this card and InnoDB Deadlocks (last 5m). If your application retries deadlock victims automatically (the recommended pattern), the user may never notice, but the error still counts here, which is why a low-level deadlock rate can keep this card slightly above zero. My disk filled up and the error rate went to 30%. Connected? Directly. When the data or log volume is full, InnoDB cannot write, so every INSERT, UPDATE, and DELETE fails while SELECTs may still succeed. The result is a high error rate dominated by write failures. Pair with Database Disk Usage %: if it is near 100% at the same time, free space (drop old binlogs, extend the volume) and the error rate recovers as soon as writes can land. Why is the threshold 1% and not higher? Because production application code almost never sends queries it expects to fail. A well-behaved service runs at thousandths of a percent. Crossing 1% means roughly one in a hundred statements is failing, which at any real traffic level is thousands of customer-facing errors per minute. 1% is deliberately sensitive so the team is paged while the cause is still fresh and findable, usually a deploy or a change made in the last few minutes. Can a permissions change cause this? Yes, and it is a common surprise. Revoking a grant, rotating a credential, or a migration that recreates a user can leave the application sending valid SQL that the server now refuses with an access-denied error. These show up here as a clean error spike with an access-denied code, not as a SQL or lock problem. If the error code points at permissions, look at recent GRANT/REVOKE activity and credential rotations rather than at the application code.

Tracked live in Vortex IQ Nerve Centre

Query Error Rate % is one of hundreds of KPI pulses Vortex IQ tracks across MariaDB and 70+ other ecommerce connectors. Nerve Centre runs the detection layer; Vortex Mind investigates the cause when something moves; Ask Viq lets you interrogate any number in plain English. Start for free or book a demo to see this metric running on your own data.