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

How to solve the problem of locking tables in Database

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly explains "how to solve the problem of database table locking". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn how to solve the problem of database table locking.

Show processlist: a large number of sleep will take up the number of connections. When the max_connections is exceeded, the new connection cannot be established, and the business is blocked or crashed.

Solution 1, troubleshoot business relationships and remove transactions.

2. Upgrade mysql5.7 and above to improve connection performance.

3. Lower the wait_timeout/interactive_ timeout value appropriately, which is only slightly higher than the timeout time of the java connection pool

4. Use pt-kill or auxiliary scripts / tools to patrol and kill useless sleep processes.

5. Make use of the new features of 5.7to set the max_execution_time threshold properly to eliminate the SQL executed for a long time.

6. Check the results of show processlist periodically, find the thread of sleep for a long time, find the process according to host&port, and then eliminate it.

* * interspersed * *

The role and use of produces in @ RequestMapping.

Produces= "application/json"

@ Controller

@ RequestMapping (value = "/ pets/ {petId}", method = RequestMethod.GET, produces= "application/json")

@ ResponseBody

Wx.navigateTo ({

Url:'.. / test?name='+name

Success: function (res) {}

Fail: function (res) {}

})

OnLoad: function (option) {

Console.info (option.name)

}

2 paramObj var = JSON.stringify (obj)

Var parseObj = JSON.parse (obj)

3, var paramObj = encodeURIComponent (obj)

Var parseObj = decodeURIComponent (obj)

This.setData ({

TestObj: obj

})

At this point, I believe you have a deeper understanding of "how to solve the problem of database locking table". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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

Servers

Wechat

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

12
Report