In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you the reasons for too many connections in mysql that lead to program connection errors, I believe most people do not know much about it, so share this article for your reference. I hope you will gain a lot after reading this article. Let's learn about it together.
1. The parameter setting is too small, and max_connections needs to be configured reasonably according to the performance and actual needs of the host.
2. Disk IWeiO bottleneck, such as being blocked by a SQL, causing subsequent DML operations to wait, such as frequent additions, deletions, changes, and queries. Disk Iscaro encounters a bottleneck, resulting in inability to process busy requests.
3. After MySQL processes a request, the connection is released according to the wait_ timeout value (parameter meaning: the number of seconds to wait before the server closes the non-interactive connection). It is generally set to 100 seconds. The default is 28800 seconds, if the MySQL concurrency is high. By default, memory will not be released until 28800 seconds later, which will cause a large number of connections to be idle and report a "too many connections" error.
4. Restarting the server results in too many database connections
After restarting the MySQL server, due to the high concurrency, InnoDB Bufer Pool will warm up. If you only rely on InnoDB to warm up, the InnoDB O bottleneck will bring very poor performance.
Solution:
In my.cnf, add the following parameters:
Innodb_buffer_pool_dump_at_shutdown = 1
Explanation: dump hot data to the local disk on shutdown
Innodb_buffer_pool_dump_now = 1
Explanation: dump the hot data to the local disk manually.
Innodb_buffer_pool_load_at_startup = 1
Explanation: load hot data into memory at startup
Innodb_buffer_pool_load_now = 1
Explanation: load hot data into memory manually
When you close MySQL, the data in memory is saved to the ib_buffer_pool file on disk, which is located in the data directory. When MySQL starts, it automatically loads hot data into Buffer_Pool.
These are all the contents of this article entitled "what are the reasons for program connection errors caused by too many connections in mysql?" Thank you for your reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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
© 2024 shulou.com SLNews company. All rights reserved.