We are still seeing the database stop responding and I cannot see any pattern to the SQL processes that are running at the time. Yesterday the ost__search table became locked and it could not be queried at all when we had the issue. Today, I can see update queries for the DB but I could manually run select statements on the database. Below is the slow query log from today when we experienced the issue (about 12:30pm)
51.5s user time, 330ms system time, 42.88M rss, 48.21M vsz
Current date: Thu Apr 25 13:12:55 2024
Hostname: #######
Files: /var/log/mysql/mariadb-slow.log
Overall: 187.92k total, 120 unique, 0.48 QPS, 0.00x concurrency ________
Time range: 2024-04-21 00:00:25 to 2024-04-25 13:12:38
Attribute total min max avg 95% stddev median
============ ======= ======= ======= ======= ======= ======= =======
Exec time 767s 66us 6s 4ms 9ms 25ms 1ms
Lock time 16s 0 673ms 84us 144us 2ms 66us
Rows sent 4.79M 0 34.59k 26.70 151.03 266.50 6.98
Rows examine 52.14M 0 171.61k 290.94 487.09 2.12k 16.81
Rows affecte 8.44k 0 16 0.05 0 0.32 0
Bytes sent 445.91M 11 11.50M 2.43k 8.89k 89.04k 487.09
Merge passes 0 0 0 0 0 0 0
Tmp tables 82.95k 1 24 1.14 0.99 1.38 0.99
Tmp disk tbl 69.67k 0 3 0.96 0.99 0.20 0.99
Tmp tbl size 2.56G 0 13.94M 35.97k 23.58k 150.11k 23.58k
Query size 27.74M 22 5.86k 154.77 284.79 278.07 130.47
Boolean:
Filesort 77% yes, 22% no
Full join 1% yes, 98% no
Full scan 98% yes, 1% no
Priority que 0% yes, 99% no
Tmp table 41% yes, 58% no
Tmp table on 39% yes, 60% no
Process List
+------+---------------+-------------------+-------------+---------+------+----------+------------------------------------------------------------------------------------------------------+----------+
| Id | User | Host | db | Command | Time | State | Info | Progress |
+------+---------------+-------------------+-------------+---------+------+----------+------------------------------------------------------------------------------------------------------+----------+
| 3669 | ###| 10.###| osticket_db | Sleep | 4541 | | NULL | 0.000 |
| 3671 | #### | 10### | NULL | Sleep | 6180 | | NULL | 0.000 |
| 3713 | ###| 10.### | osticket_db | Sleep | 6341 | | NULL | 0.000 |
| 4149 | ###| 10.### | osticket_db | Sleep | 4541 | | NULL | 0.000 |
| 4150 | ###| 10.### | NULL | Sleep | 5139 | | NULL | 0.000 |
| 4151 | ###| 10.### | NULL | Sleep | 3943 | | NULL | 0.000 |
| 4318 | osticket_user | localhost | osticket_db | Query | 3644 | Update | INSERT INTO ost_ticket
SET created
= NOW(), lastupdate
= NOW(), number
= '009713', user_id
| 0.000 |
| 4361 | osticket_user | localhost | osticket_db | Query | 2984 | Update | INSERT INTO ost_ticket
SET created
= NOW(), lastupdate
= NOW(), number
= '009714', user_id
| 0.000 |
| 4440 | osticket_user | localhost | osticket_db | Query | 2385 | Update | INSERT INTO ost_ticket
SET created
= NOW(), lastupdate
= NOW(), number
= '009715', user_id
| 0.000 |
| 4473 | osticket_user | localhost | osticket_db | Query | 1783 | Update | INSERT INTO ost_ticket
SET created
= NOW(), lastupdate
= NOW(), number
= '009716', user_id
| 0.000 |
| 4503 | osticket_user | localhost | osticket_db | Query | 1183 | Update | INSERT INTO ost_ticket
SET created
= NOW(), lastupdate
= NOW(), number
= '009717', user_id
| 0.000 |
| 4546 | osticket_user | localhost | osticket_db | Query | 757 | Update | INSERT INTO ost_ticket
SET created
= NOW(), lastupdate
= NOW(), number
= '009718', user_id
| 0.000 |
| 4556 | osticket_user | localhost | osticket_db | Query | 583 | Update | INSERT INTO ost_ticket
SET created
= NOW(), lastupdate
= NOW(), number
= '009719', user_id
| 0.000 |
| 4561 | osticket_user | localhost | osticket_db | Query | 457 | Update | INSERT INTO ost_ticket
SET created
= NOW(), lastupdate
= NOW(), number
= '009720', user_id
| 0.000 |
| 4603 | osticket_user | localhost | osticket_db | Query | 158 | Update | INSERT INTO ost_ticket
SET created
= NOW(), lastupdate
= NOW(), number
= '009721', user_id
| 0.000 |
| 4634 | root | localhost | osticket_db | Query | 0 | starting | SHOW PROCESSLIST | 0.000 |
+------+---------------+-------------------+-------------+---------+------+----------+------------------------------------------------------------------------------------------------------+----------+
16 rows in set (0.001 sec)
Any help on where to look next would be appreciated. I can only get things working again by running a task kill on the service.