Actionables:
- convert heartbeat tables to innodb to see if that helps with concurrency
- increase the number of concurrent threads on the pool of connections
- Reimage the API enwiki servers with the latest version of MariaDB and disable query-rewrite
All of the above actions have the potential of making the problem worse, not better.
Mediawiki logging complains about: "db1065 not replicating" https://logstash.wikimedia.org/goto/9bed049145ba2757e546bea6bc3967b1