Finch Docs
Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Error Handling

Finch handles these MySQL errors without reconnecting:

ErrorMySQL Error CodeHandling
Deadlock1213MySQL automatically rolls back
Lock wait timeout1205Execute ROLLBACK because innodb_rollback_on_timeout=OFF by default
Query killed1317
Read-only1290, 1836
Duplicate key1062

After handling the errors above, Finch starts a new iteration from the first assigned trx.

Other errors cause Finch to disconnect and reconnect to MySQL, then start a new iteration. Reconnect time is not directly measured or recorded, but if it’s severe it will reduce reported throughput because Finch will spend time reconnecting rather than executing queries.

Query statistics are recorded when the query returns an error. This is usually correct because, for example, a lock wait timeout is part of query response time. However, for errors that cause a fast error-retry-error loop, it will skew statistics towards zero or artificially high values.