Linux ulimit and Dynamic Modification of MySQL maximum number of threads

Source: Internet
Author: User

However, software resource restrictions do not change much, especially process/file, which correspond to nproc and nofile respectively.
Nproc can be queried by ulimit-u; nofile can be queried by ulimit-n.

Here, we will introduce/etc/security/limits. d/90-nproc.conf after kernel 2.6.32.
This means that the configuration of the file in/etc/security/limits. d/overwrites the configuration of/etc/security/limits. conf.

Most configuration files with hardware and software restrictions are located at:/etc/security/limits. conf

For example, modify the fd (file handle) restriction.
* Soft nofile NNNNN
* Hard nofile NNNNN

Confirm modification: ulimit-Hn; ulimit-Sn

Dear masters, is there a way to modify the maximum nproc parameter of mysql users without restarting the database! Error message: Can't create a new thread (errno 11); of course, at the beginning of the project, the system's ulimit, program connections, and so on will certainly be modified; but this is in case of emergency: currently, the solution is as follows: 1. Disable an ip connection in iptables. 2. Disable tcpkill to kill useless tcp connections. After connecting to mysql, modify the max_connection <nproc parameter; is it possible to modify the maximum nproc of mysql users without restarting the database!


MySQL runs in thread mode, and the number of threads is also counted in nproc, which may mask or cause false positives.

Echo-n "Max processes = 204800: 204800">/proc/'pidof mysqld'/limits
To dynamically modify the limits information of the system resources of a process.
This method can solve the maximum number of MySQL processes, which is very simple and convenient.




2013-09-23
Good Luck

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

11.11 Big Sale for Cloud

Get Unbeatable Offers with up to 90% Off,Oct.24-Nov.13 (UTC+8)

Get It Now >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.