Hello
Another error I noticed on the same day that this issue occured smtp sending issue was this:
DB Error #1205
[UPDATE ost_session
SET session_expire
= (NOW() + INTERVAL 21600 SECOND), user_id
= 52, session_updated
= NOW() WHERE ost_session
.session_id
= 'cvbf5t8hkvl84pqctkji2f94ae' LIMIT 1] Lock wait timeout exceeded; try restarting transaction
---- Backtrace ----
#0 (root)/include/mysqli.php(207): osTicket->logDBError()
#1 (root)/include/class.orm.php(3482): db_query()
#2 (root)/include/class.orm.php(658): MySqlExecutor->execute()
#3 (root)/include/class.ostsession.php(374): VerySimpleModel->save()
#4 (root)/include/class.ostsession.php(364): DatabaseSessionRecord->save()
#5 (root)/include/class.ostsession.php(356): DatabaseSessionRecord->commit()
#6 (root)/include/class.ostsession.php(536): DatabaseSessionRecord->expire()
#7 (root)/include/class.session.php(369): DatabaseSessionStorageBackend->expireRecord()
#8 (root)/include/class.ostsession.php(234): osTicket\Session\AbstractSessionStorageBackend->expire()
#9 (root)/include/class.ostsession.php(262): osTicketSession::expire()
#10 (root)/include/class.usersession.php(163): osTicketSession::renewCookie()
#11 (root)/scp/staff.inc.php(104): StaffSession->refreshSession()
#12 (root)/scp/tickets.php(17): require('...')
#13 {main}
This error occured in total 102 times in span of 45min (until I restarted mysql). I noticed different user id's involved which makes sense when table was locked. Sadly I didn't check which query was holding the lock on the table..
No errors in php, mysql or apache logs during that time. After that incident I added query + slow_query log to mysql.
I noticed that ost_session inserts/updates are mentioned there but maximum time was 6s, which is slow of course but nothing near the mysql timeout.