[MDEV-13658] Deadlock found when trying to get lock and Lock wait timeout exceeded Created: 2017-08-27 Updated: 2017-09-27 Resolved: 2017-09-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Configuration, Locking |
| Affects Version/s: | 10.2.8 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Md Tajirul Islam | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | innodb, need_feedback | ||
| Environment: |
CentOS 7.3, PHP Version 7.1.8, MariaDB 10.2.8 |
||
| Description |
|
I am using MySQL version 5.6.37 and Does not get any Server Error Log. Today I Do Upgrade to MariaDB 10.2.8 and Now lot of Server Error Log happened about Deadlock found when trying to get lock and Lock wait timeout exceeded. So this issue only happening with MariaDB.
|
| Comments |
| Comment by Elena Stepanova [ 2017-08-27 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Transactional deadlocks and lock wait timeouts are quite often a part of the normal operation. MariaDB 10.2 has a higher default level of log_warnings, which makes it print into the error log messages which previous versions (MySQL 5.6, MariaDB 10.1) didn't print. If you really want to compare MySQL 5.6 and MariaDB 10.2 properly, make sure they both have the same log_warnings value in the config file – either both have 1, in which case they won't print these messages, or both have 2, in which case they will print them. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Md Tajirul Islam [ 2017-08-27 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Everything was working fine prior to the change from MySQL to MariaDB, the issue would lie in the MariaDB configuration?I think we do mistake Upgrade to MariaDB. Lot of deadlocks and lock wait timeouts log happening. We have 10 CPUs with 50 GB RAM Memory. This my current my.cnf the following configuration.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2017-08-27 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Once again, if you are only judging that "everything was working and now it is not" by the messages in the error log, you cannot do that. MariaDB 10.2 by default produces more diagnostics messages than MySQL 5.6, which is why you are getting those records in the log. If you want to return to MySQL behavior, add log_warnings=1 to your my.cnf file and restart the server. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Md Tajirul Islam [ 2017-08-28 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I have added log_warnings=1 to my my.cnf, What does with adding this? Does its stop deadlocks and lock wait timeouts issue? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2017-08-28 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
To my understanding, your complaint was that 10.2 writes to the error log errors like
which MySQL 5.6 does not write. The change in the variable value fixes that. The presence of these errors in the log alone does not indicate any change in behavior between the servers, it's just a change in logging. (it's possible that there is an actual difference, because InnoDB is essentially different between the versions, but the error log is not a proof of it). If after disabling the extra logging you still have reasons to believe that you are getting more deadlocks/timeouts on 10.2 than on 5.6, please present them, preferably with a use case which does not lock on 5.6 but locks on 10.2. |