BAC-322: add log backtrace for "MySQL server has gone away" errors

Yet another approach to fix BAC-322.