SQL using resources
Hi everyone,
for the past month or so, I have been seeing a spike in my SQL usage under Process manager (owner: mysql | command: /usr/sbin/mariadbd). When I trace it, I get an infinite list of the errors below. A server reboot does nothing and I can't find anything online that would let me know what's wrong and why my SQL is using the most of my CPU. Did anyone have any similar issues?
Edit: I just wanted to write that this has started happening while I was using MariaDB 10 and I have tried to upgrade to the latest so my current installed is: MariaDB 11.4.5-MariaDB
strace: Process 2890997 attached
restart_syscall(<... resuming interrupted poll ...>) = 1
accept4(1047, {sa_family=AF_UNIX}, [128 => 2], SOCK_CLOEXEC) = 1134
futex(0x561e9a9a322c, FUTEX_WAKE_PRIVATE, 1) = 1
accept4(1047, 0x7fff5883aec0, [128], SOCK_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=1045, events=POLLIN}, {fd=1046, events=POLLIN}, {fd=1047, events=POLLIN}, {fd=1065, events=POLLIN}], 4, -1) = 1 ([{fd=1047, revents=POLLIN}])
accept4(1047, {sa_family=AF_UNIX}, [128 => 2], SOCK_CLOEXEC) = 1317
futex(0x561e9a9a322c, FUTEX_WAKE_PRIVATE, 1) = 1
accept4(1047, 0x7fff5883aec0, [128], SOCK_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=1045, events=POLLIN}, {fd=1046, events=POLLIN}, {fd=1047, events=POLLIN}, {fd=1065, events=POLLIN}], 4, -1) = 1 ([{fd=1047, revents=POLLIN}])
accept4(1047, {sa_family=AF_UNIX}, [128 => 2], SOCK_CLOEXEC) = 1328
futex(0x561e9a9a322c, FUTEX_WAKE_PRIVATE, 1) = 1
accept4(1047, 0x7fff5883aec0, [128], SOCK_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=1045, events=POLLIN}, {fd=1046, events=POLLIN}, {fd=1047, events=POLLIN}, {fd=1065, events=POLLIN}], 4, -1) = 1 ([{fd=1047, revents=POLLIN}])
accept4(1047, {sa_family=AF_UNIX}, [128 => 2], SOCK_CLOEXEC) = 1134
futex(0x561e9a9a322c, FUTEX_WAKE_PRIVATE, 1) = 1
accept4(1047, 0x7fff5883aec0, [128], SOCK_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=1045, events=POLLIN}, {fd=1046, events=POLLIN}, {fd=1047, events=POLLIN}, {fd=1065, events=POLLIN}], 4, -1) = 1 ([{fd=1047, revents=POLLIN}])
accept4(1047, {sa_family=AF_UNIX}, [128 => 2], SOCK_CLOEXEC) = 1317
futex(0x561e9a9a3228, FUTEX_WAKE_PRIVATE, 1) = 1
accept4(1047, 0x7fff5883aec0, [128], SOCK_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=1045, events=POLLIN}, {fd=1046, events=POLLIN}, {fd=1047, events=POLLIN}, {fd=1065, events=POLLIN}], 4, -1) = 1 ([{fd=1047, revents=POLLIN}])
accept4(1047, {sa_family=AF_UNIX}, [128 => 2], SOCK_CLOEXEC) = 1329
futex(0x561e9a9a3228, FUTEX_WAKE_PRIVATE, 1) = 1-
Hey there! None of the details from that output mean much to me. Are there any errors inside the MySQL error log itself? That would typically be stored at /var/log/mysqld.log unless the location has been customized.
1 -
Hi cPRex thank you for your reply.
The logs don't seem to offer anything special, but still here is the log for this month (valid for 7 days);
https://pastebin.com/sKrwbXAj
since MariaDB is constantly using about 40% of my servers resources and the above trace is constant I'd expect the log to be more than 12MB in size (the log is since thegning of 2019).Anything else I can check? Just in case here is the output of the variables;
https://pastebin.com/1TMYhjZP
Thank you again!0 -
That log does show that the "production" table has some type of issue, and is frequently being accessed. If that isn't an InnoDB table you could try and run a repair on it. If it is an InnoDB table, you may be better off restoring a backup, but the number of crashed table errors in that log isn't a good sign.
0
Please sign in to leave a comment.
Comments
3 comments