Mysql deadlock occurs when the disk is full.
Today, I encountered a problem because the disk of the machine where mysql is located is full, leading to a mysql deadlock and not even querying the select statement. If I did not read the mysql Log, I could not find the cause.
Show processlist shows that the first update statement needs to be written, because the disk is full and cannot be written, resulting in a mysql deadlock.
You can view the mysql Log and find an alarm log: "[Warning] Disk is full writing '. /mysql-bin.000123 '(Errcode: 28 ). waiting for someone to free space... (keep CT up to 60 secs delay for server to continue after freeing disk space )"
The reason is that the disk space is fully occupied.
I killed the mysql process before I started it to release the disk space, I don't know whether the problem can be solved by directly releasing the disk space (it is estimated that mysql will return after one minute ).
When a problem occurs today, try kill-3 to dump the thread information of the process to check whether the program is faulty, and the result is not dump. It is estimated that the disk is full, dump information is not stored in disk space.
In the future, let's see if the disk space is full.