Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What about the explosion of mysql threads

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article shares with you what to do about the explosion of mysql threads. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Colleagues reported that the backstage login is not available, reported errors can not be connected to. Immediately to the database to see that the number of connections has reached 1000, has occupied the number of connections.

In order not to affect other applications, first increase the number of connections.

Set global max_connections=2000

If you look further down, you will find that there are all such connections.

| | 16472659 | unauthenticated user | 192.168.100.11 Connect 55282 | NULL | NULL | login | NULL |

| | 16472660 | unauthenticated user | 192.168.100.11 Connect 55284 | NULL | NULL | login | NULL |

| | 16472661 | unauthenticated user | 192.168.100.11 Connect 55290 | NULL | NULL | login | NULL |

Google turns out to be:

Look at the explanation in the manual: unauthenticated user refers to a thread that has become associated with a client connection but for which authentication of the client user has not yet been done. This means that there is a thread processing the client's connection, but the client has not yet been authenticated by the user.

The reasons may be:

1. The server is doing DNS response analysis. There are 2 solutions:

1.) add client ip to hosts, such as

192.168.0.1 yejr

2. Add a skip-name-resolve to the MySQL startup parameter, that is, do not enable DNS response resolution

2. The thread of the server is still queued, so you can increase the back_log.

My authorization form uses both IP address and domain name. Cannot restart service, only add hosts record 192.168.100.11 webserver

Still connection error, this time reported that webserver can not connect to 192.168.100.11, there is no way but to re-add the authorization form host name webserver.

Flush privileges

Flush hosts; is needed.

Thank you for reading! This is the end of the article on "what to do with the explosion of MySQL threads". 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 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.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report