database/sql: set maximum lifetime of connection · Issue #9851 · golang/go

MySQL has wait timeout option. It limits sum of idle time. If wait_timeout=3600, client should not use connection created before one hour ago. Otherwise, connection may be killed while transaction....