MySQL max_connections and Max pool settings

Source: Internet
Author: User
Tags connection pooling

These days of work, in the use of MySQL database, encountered too many connections problem and timeout expired problem, after trying, a little summary, hoping to help the needs of friends;

Found in the test,

1:too Many connections error will be greater than the value of max_connections in max pool size, and connections in the connection pool are all occupied, and a new connection request occurs;

2:timeout expired error occurs when the value of max pool size is less than the value of max_connections, and the number of connections reaches the value of max pool size, and there is a new connection request;

For the first case, you can modify the maximum number of MySQL connection configuration to solve, modify the method is not elaborate, a lot of online;

For the second case, it can be resolved by modifying the configuration of the database connection string, involving two property names pooling and Max Pool size,pooling As Boolean, True, enabled, False, not enabled (enabling connection pooling is much more efficient than not enabling connection pooling), Max pool size is an int value;

Basically is this, hope can help the need of friends, if there is any place in the text is inaccurate, incorrect, incomplete, but also sincerely welcome friends advice;

MySQL max_connections and Max pool settings

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.