Are you using DBD::mysql or DBD::MariaDB? IIRC there was an issue with the former that was resolved in the latter.
In reply to Re: DBI lost connection by marto in thread DBI lost connection by luxs