试试调大参数 tidb_retry_limit
https://docs.pingcap.com/zh/tidb/v4.0/tidb-faq#311-error-8005-hy000--write-conflict-txnstartts-is-stale