[MDEV-24744] MariaDB unresponsive Created: 2021-01-30 Updated: 2021-05-17 Resolved: 2021-05-17 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Affects Version/s: | 10.5.8 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Mehmet | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | crash, need_feedback, performance, regression | ||
| Environment: |
Ubuntu 64 bits. CPU: Intel Xeon E5-1660v3 - 8c/16t - 3GHz /3.5GHz |
||
| Attachments: |
|
| Description |
|
Mariadb stops working after 3-5 weeks, this is happening 4th times after upgrading database version to 10.5.* Unfortunately there is no log, and database is running but all current connections to database becomes unresponsive but i can create new connection using SSH to database and execute queries For example i can execute this command and see results
but i can not kill process id, or when i execute this command i never get any response
When i executed this command
I saw almost all tables had > 1000 in_use It seems that something is locked and not allowing other queries to be executed These are the last logs before mariadb becomes unresponsive Jan 30 15:15:45 ns535551 mariadbd[19731]: 2021-01-30 15:15:45 3221 [ERROR] mariadbd: Can't find record in 'MessageContent' Jan 30 15:20:37 ns535551 mariadbd[19731]: 2021-01-30 15:20:37 322378 [Note] InnoDB: Number of pools: 2 and these are the first 2 queries which becomes unresponsive
I just had an idea about the problem, as you pay attention to following part at my last query
Database was unresponsive 4 times before and we always had this part at the last queries We will fix query but even if we have this case, system must be responsive because we reorder results list and fetch only 50 rows from it. |
| Comments |
| Comment by Daniel Black [ 2021-04-14 ] | |
|
Could it be that innodb_open_files is limiting your number of open tables? Note the default is to autosize to signifcantly larger. maybe its thrashing on this. If it happens again `show engine innodb status` may be helpful. Having Debuginfo packages installed ahead of next time (https://downloads.mariadb.org/mariadb/repositories/#distro=Ubuntu&distro_release=focal--ubuntu_focal&mirror=tripleit&version=10.5) And scripting a backtrace full on all threads may also provide enough useful information to see what is happening: | |
| Comment by Mehmet [ 2021-04-14 ] | |
|
we have fixed query and we are not having this issue again
we have 4 million rows on Account table, when query fetches all records, database is becoming unresponsive | |
| Comment by Daniel Black [ 2021-04-14 ] | |
|
> I have already attached our my.cnf file, you can see our configuration I saw. I looked. I offered a suggestion. And as an additional suggestion, look at join buffer settings, and the type of query plan used (as show in EXPLAIN query), and look at the documentation https://mariadb.com/kb/en/query-optimizations/ on what system variables can assist/guide that query. Also included was a request for information. > It will be very helpful to reproduce this case on test environment So what's stopping you? I also looked at your query. Its very long, hard to read, and without table information (SHOW CREATE TABLE), or EXPLAIN query, hard to do anything with. If your remove the USE INDEX directives, particularly on Person, does that help? Can you start with a simpler query and work up to the point of difficulty? | |
| Comment by Daniel Black [ 2021-04-14 ] | |
|
You mention regression, what was the previous version? If you use your current data in that test environment, what is the EXPLAIN query for the same query that was ok on the previous version? |