Putting Sixta to the Test: AI-Assisted MySQL Troubleshooting with PMM Percona tested Sixta, an AI database-diagnostics agent that runs as two processes on a Percona Monitoring and Management (PMM) host and never connects to database servers, against five controlled MySQL failure scenarios on a Percona Server for MySQL 8.0 primary-replica setup. Sixta, which by default calls Claude through Anthropic's API and gives each investigation a ten-minute budget, correctly identified the sysbench read/write workload with 8 threads as a load test rather than an organic problem, citing QPS rising from about 7/s to 5,500-6,000/s and threads_running climbing from a baseline of 1-2 to 9-10. The remaining scenarios included changing innodb_flush_log_at_trx_commit from 2 to 1 and sync_binlog from 1000 to 1 (throughput fell from about 6,000 to 4,000 QPS), dropping the primary key of sbtest1 on the replica, an uncommitted transaction, and a restart with read_only=1 that produced error 1290. Sixta https://www.sixta.ai/ is an AI agent that investigates database problems the way a DBA would. We wanted to evaluate how effectively it could diagnose MySQL problems using only the monitoring data already available in Percona Monitoring and Management PMM https://www.percona.com/monitoring/ . To test this, we set up a Percona Server for MySQL 8.0 primary-replica environment monitored by PMM. We introduced several test scenarios, ranging from simulated database failures and performance issues to proactive health checks. For each scenario, we asked Sixta to investigate through Slack, relying exclusively on PMM metrics and monitoring data, without direct access to the database servers. In this blog post, we share how Sixta works, the scenarios we tested, how it analyzed the available data, and the insights it provided. We also highlight where Sixta performed well, its limitations, and the situations where human DBA expertise remains essential. Sixta https://www.sixta.ai/ is an AI-assisted database diagnostics layer. It reads the monitoring data a DBA would read, runs a structured investigation, and writes up what it found and what it concluded. In our setup, Sixta worked alongside PMM. We asked it a question in Slack, and it investigated using PMM metrics, Query Analytics QAN , and alerts, then replied with its findings. Sixta runs as two processes on the PMM host. Nothing is installed on the database hosts, and Sixta never connects to them. During an investigation, the model Claude, through Anthropic’s API by default calls the diagnostic tools it needs and reads Sixta’s memory of earlier investigations on that database. It then produces a conclusion in a fixed shape: what happened, the likely cause, the evidence, the severity, and whether action is needed. Each investigation has a ten-minute budget. We used a dedicated three-server test environment with the following setup: Sixta could see only what PMM collects. It could not run SQL against the databases, read MySQL error logs, or log in to the hosts. We integrated Sixta into Slack and asked it questions in plain English by tagging @sixta , the same way you would ask a colleague. This tells us how far the agent can get with PMM data alone. We introduced controlled problems: extra workload, configuration changes, schema changes, an uncommitted transaction, direct changes on the replica, and a restart into read-only mode. For each one, we prompted Sixta to find the cause and recommend a fix, then compared its answer with what we had actually done. We ran five scenarios: | | What we did | How it showed up | | 1 | Ran a sysbench read/write workload with 8 threads on db1 | Threads Running spike | | 2 | Changed innodb flush log at trx commit from 2 to 1 and sync binlog from 1000 to 1 on db1 | Throughput fell from about 6,000 to 4,000 QPS | | 3 | Dropped the primary key of sbtest1 on the replica | Replication lag | | 4 | Opened a transaction on db1, ran a query, and did not commit | InnoDB history list length increase | | 5 | Set read only=1 in my.cnf on db1 and restarted MySQL | Application writes failed with error 1290 | What we did: Ran a sysbench read/write workload with 8 threads on db1. How it showed up: Threads Running spike alert on db1 Sixta’s response: This is a load test, not an organic problem. At 18:37 UTC a sysbench-style benchmark started on db1: QPS jumped from ∼7/s to ∼5,500-6,000/s, connections doubled from 2 to 10, and threads running went from a baseline of 1-2 to 9-10. QAN for that window is dominated by the classic sysbench query patterns against sbtest1–sbtest10 ∼30k executions each of SELECT c FROM sbtestN WHERE id BETWEEN ? AND ? ORDER BY c in 20 minutes . The alert fires when avg threads running per CPU exceeds 3; the firing value is 3.5, so on this small box even a modest benchmark trips it. The queries themselves are healthy sub-millisecond, ∼200 rows examined per 100 returned . Fix options: stop the benchmark if it’s not supposed to be running, or if it’s intentional, either lower the sysbench thread count or silence/suppress this rule for db1 while the test runs. Nothing is wrong with the database itself. Our analysis: Sixta identified the benchmark workload by analyzing query patterns in PMM Query Analytics QAN . It supported its findings by correlating the workload with changes in QPS, database connections, and running threads observed around 18:37 UTC. Sixta also explained why the alert was triggered. Since the alert threshold is normalized by CPU count, even a benchmark running with a relatively small number of threads can exceed the threshold on a server with limited CPU resources. Sixta’s recommended actions were also appropriate: stop the benchmark, reduce the number of benchmark threads, or temporarily silence the alert during planned load testing. What we did: Changed innodb flush log at trx commit from 2 to 1 and sync binlog from 1000 to 1 on db1. How it showed up: Throughput dropped from about 6,000 to 4,000 QPS. This is a durability config change, not a query problem. At 19:00 UTC on db1-mysql, innodb flush log at trx commit was changed from 2 → 1 and sync binlog from 1000 → 1 both visible in the exporter’s variable metrics . That makes MySQL fsync the redo log and binlog on every commit instead of batching. The effect is unambiguous: InnoDB fsyncs jumped from ∼10/s to ∼500/s at exactly 19:00, iowait rose while user CPU actually dropped the server has spare CPU but commits are now stalling on disk flushes , and QPS fell from ∼6k to ∼3.7–4k at the same minute. To restore throughput, revert to: SET GLOBAL innodb flush log at trx commit = 2; SET GLOBAL sync binlog = 1000; both dynamic, no restart 12 SET GLOBAL innodb flush log at trx commit = 2; SET GLOBAL sync binlog = 1000; both dynamic, no restart The trade-off: the current settings are the fully durable ones — reverting means up to ∼1s of committed transactions could be lost on a crash. On this sysbench test box that’s presumably fine; if you need full durability and higher throughput, the fix is faster fsync better disk or binlog group-commit tuning rather than query changes. It found both variable changes at the exact minute throughput fell, and confirmed the mechanism with three independent signals: fsyncs up from about 10 to 500 per second, iowait up, and user CPU down. That combination shows the server was waiting on disk flushes, not short of CPU. The fix came with the right trade-off. Sixta did not simply recommend reverting; it stated the data-loss risk of doing so and named the alternatives if full durability must stay. What we did: We dropped the primary key from the sbtest1 table directly on the replica to simulate a scenario where the absence of a primary key can slow down row-based replication. Without a primary key, MySQL may need to scan more rows to locate records for UPDATE and DELETE operations, potentially causing replication lag. We then asked Sixta to investigate the increasing lag, identify the underlying cause. How it showed up: Replication lag started increasing after the primary key was dropped, indicating that the replica was struggling to keep up with changes from the primary. Replica is falling behind, lag is now ∼220s, growing ∼60s/min i.e. near-zero effective apply . The cause is in db2’s QAN: someone ran ALTER TABLE sbtest1 MODIFY id INTEGER NOT NULL, DROP PRIMARY KEY directly on the replica at ∼19:15 it did NOT run on the primary . With no primary key on the replica’s copy of sbtest1, row-based replication must full-scan the table for every replicated row change — rows read are pegged at ∼400k/s with a CPU core burning, and apply collapsed from ∼300 to ∼7 trx/s. Fix — restore the key on the replica: ALTER TABLE sbtest.sbtest1 MODIFY id INT NOT NULL AUTO INCREMENT, ADD PRIMARY KEY id ; 1 ALTER TABLE sbtest.sbtest1 MODIFY id INT NOT NULL AUTO INCREMENT, ADD PRIMARY KEY id ; The ALTER will take a minute or two table rebuild behind the stalled applier , then apply should jump back to full speed and burn down the backlog. Worth finding out who’s running DDL on this replica. It found the real cause of the lag in the replica’s QAN, confirmed the DDL had run only on the replica, and explained the mechanism: without a primary key, every replicated row change becomes a full table scan. Rows read at about 400,000 per second and apply falling from about 300 to 7 transactions per second backed that up. The fix was precise and included the expected rebuild time. What we did: Opened a transaction on db1, ran a query and left it uncommitted. How it showed up: InnoDB history list length kept rising on the primary. Confirmed — history list length on db1 was near zero all day, ran at a healthy 50–300 after the sysbench-style read/write workload on the sbtest tables started at 18:37 UTC, then went into runaway growth at ∼19:30 UTC: 215 → 10,884 → 27,357 → 41,196 in three minutes, still climbing ∼14k/min. The write rate is what rules out “just heavy load”: updates held steady at ∼550–600/s and commits at ∼280–300/s across the transition, and connections stayed flat at 10. Undo generation didn’t change — purge stopped reclaiming. That pattern is almost always a long-running transaction or a stale read view, e.g. an idle session that ran BEGIN and never committed opened right around 19:30 that pins the oldest read view, so InnoDB can’t purge any undo created after it. I only have PMM access to this host, so I can’t see information schema.INNODB TRX directly. To find and fix it, run on the primary: SELECT trx id, trx started, trx mysql thread id, trx rows modified, trx query FROM information schema.INNODB TRX ORDER BY trx started LIMIT 5; 1 SELECT trx id, trx started, trx mysql thread id, trx rows modified, trx query FROM information schema.INNODB TRX ORDER BY trx started LIMIT 5; Expect one transaction started ∼19:30 UTC. If it’s abandoned Sleep state, no query , KILL that thread id or have the owner commit/rollback — HLL should drain back down within minutes once released. If left alone, undo will keep accumulating disk growth in the undo tablespace, and progressively slower reads as queries wade through old row versions . Purge-lag tunables innodb purge threads, innodb max purge lag aren’t the fix here — purge isn’t slow, it’s blocked. Sixta could not see the open transaction itself, yet it reached the right conclusion by ruling out the alternative. A steady write rate and flat connections meant undo generation had not changed, so the growth had to come from purge being blocked. That pointed to exactly what we had done: a transaction left open around 19:30. It was also clear about its limits. It said PMM-only access could not show INNODB TRX, gave the query to find the session, and explained how to resolve it safely. What we did: Set read only=1 on db1 and restarted MySQL. How it showed up: The application failed with error 1290: “The MySQL server is running with the –read-only option so it cannot execute this statement” for UPDATE sbtest1 SET k=k+1 WHERE id=50342. Found it — the error is coming from the primary db1 itself, which is now read-only. Its mysqld restarted at ∼20:01 UTC uptime counter reset from 13 days to 50s , and it came back up with read only=ON at 20:02 — the app’s UPDATEs against sbtest1 started failing with error 1290 at that point. The MySQLPrimaryReadOnly alert went pending at 20:02:30 confirming this. The restart freed ∼1.7 GB of memory on the host; whether it was a crash/OOM kill or a deliberate restart I can’t tell from metrics alone — worth checking the mysqld error log and journalctl on db1. Suggested path: confirm nobody is mid-switchover, then re-enable writes on db1 SET GLOBAL super read only=0; SET GLOBAL read only=0; and check whether read-only was recently added to db1’s my.cnf — if it was, that’s why the restart flipped it and it’ll recur on the next restart. … Sixta went from an application error message to the cause in one step. It linked three signals on the primary: the uptime reset at about 20:01, read only turning on at 20:02, and the primary-read-only alert. It was honest that metrics alone could not show whether the restart was deliberate or a crash, and pointed to the error log and journalctl. Its suggested path matched what we had done. It recommended checking my.cnf for a recently added read-only setting, which matches how we set up this scenario, and warned it would recur on the next restart. It also noticed that both nodes were now read-only, so no node in the pair could accept writes. These are the strengths we saw most often. Sixta’s main limitation was visibility: it could see only what PMM collects. Some details needed to confirm a cause required direct database or operating system checks. In our tests, these included: In each of these cases Sixta asked for the right check. But it could not close the investigation by itself. Based on our tests, treat an agent like Sixta as a fast first investigator, not as the final word. Overall, Sixta’s performance in our evaluation looks promising. Relying solely on PMM metrics, it accurately diagnosed throughput loss, replication lag, blocked purge, and a read-only primary instance with precise timestamps, supporting evidence, and actionable fixes. Moreover, it transparently flagged the boundaries of its visibility whenever PMM metrics were insufficient and asked for the appropriate checks. While its insights remain bounded by the available monitoring data and still benefit from human review, Sixta demonstrates strong potential as an AI-assisted diagnostic layer to help DBAs rapidly investigate and resolve database issues. A note from the Sixta team: If you run PMM, Sixta can investigate your own alerts from the data you already have. It reads PMM through a viewer-role token, installs nothing on your database hosts, and answers in Slack, Teams, or its own web interface. We’re taking on a small number of teams at the moment. Tell us about your setup → sixta.ai/pmm Resources RELATED POSTS