In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is to share with you about what to do when mysql causes the tmp directory to run out of space. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Received the disk space alarm message, / tmp directory disk utilization 99%.
Mysql's tmpdir is set in the / tmp directory, check ls-alth for the first time and find large files, and there are no files such as mysql temporary tables.
Connect to mysql,show processlist and query for finding exceptions.
For the entire / tmp directory 8GB, check df-h to find that the / tmp Avail value is about 100MB; du-sh finds that only a few dozen MB are used in the tmp directory. Where is the extra space in 7GB? Not released?
Through lsof | grep tmp | more found that one of the mysql instances is similar to / tmp/MLXvlID8 (deleted)
Check the mysqld.err and find multiple lines: [ERROR] / mysql_base/bin/mysqld: Sort aborted
Guess: Sql terminated abnormally, resulting in sort aborted. Although files such as / tmp/ML* in the temporary directory are deleted, because the MySQL thread connection is a persistent connection, the thread still exists and the space will not be released for the time being.
To free up space:
1. Restart mysql
two。 Restart the application and disconnect the long connection.
Results:
The application restarts, the long connection is disconnected, and the deleted space is released.
Thank you for reading! This is the end of this article on "what to do when mysql causes tmp directories to run out of space?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
#! / bin/bashecho-e "\ n\ n*~~DATE:" `date'+% Y/%m/%d% T'` "~
© 2024 shulou.com SLNews company. All rights reserved.