Can you replicate the problem by switching to DBD::MariaDB?
In reply to Re^3: DBI lost connection by marto in thread DBI lost connection by luxs