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

Linux dynamically modifies max user processes limits

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

Share

Shulou(Shulou.com)06/01 Report--

The limits parameter of the mysql process can be used as follows:

echo -n 'Max processes=SOFT_LIMITS:HARD_LIMITS' > /proc/`pidof mysqld`/limits

The above command allows you to dynamically adjust the existing mysqld processes limit.

For example, in this lab environment, the operating system information is as follows:

~]# uname -r

2.6.32-131.0.15.el6.x86_64

~]# echo -n "Max processes=10240:10240" > /proc/12946/limits

It is found that the limit parameter corresponding to the mysql process has been dynamically changed to 10240. At this time, multiple connections to mysql are simulated again:

At this point, the exception thrown is too many connections and no longer:? Can't create a new thread (errno 11)

To sum up, the max process limit of the database server needs to be adjusted, at least to ensure that the max connections of the database are smaller than it. If the already running mysql encounters this problem and it is really necessary to increase the max connections, you can dynamically adjust the limits parameter of the running mysql by echo -n 'Max processes=SOFT_LIMITS:HARD_LIMITS' > /proc/`pidof mysqld`/limits, so as to avoid restarting the database operation.

See www.percona.com/blog/2013/02/04/cant_create_thread_errno_11/

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

Database

Wechat

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

12
Report