Solve the problem of a large number of unauthenticated users in MySQL, unauthenticated

Source: Internet
Author: User

Solve the problem of a large number of unauthenticated users in MySQL, unauthenticated

Recently, OJ and related open site operations have been exceptionally slow, causing a crash and no reason has been found!

Enter the database server, enter mysql, and useShow processlistCommand to view, found that there are a lot of unauthenticated user


Google,

This is a MySQL bug. no matter whether the connection is through hosts or ip address, MySQL will reverse query the DNS and IP address to the DNS. The reverse query speed is too slow.

(Whether it is a problem with the dns server provided by the isp or other reasons), a large number of queries are hard to cope with. If the thread is not enough, it will increase the thread, but it will not be released, therefore, MySQL will be "suspended ".

The solution is simple. End the reverse lookup process and prohibit any parsing.


Open the mysql configuration file (my. cnf) and add a line under [mysqld:

Skip-name-resolve

Reload the configuration file or restart the MySQL service.




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.