In the case of tens of millions of data, how does mysql handle 1040 without modifying the configuration file?

Source: Internet
Author: User
In the case of tens of millions of data, how does mysql handle 1040 without modifying the configuration file? In the case of tens of millions of data, how does mysql handle 1040 without modifying the configuration file?

Reply content:

In the case of tens of millions of data, how does mysql handle 1040 without modifying the configuration file?

1040 indicates that the maximum number of connections has been exceeded. if you do not modify the configuration file, run the command in mysql shell.

Set global max_connections = 10000;

I understand that the subject actually wants to control the number of connections at the logic layer. for my personal opinions, see:

  1. The client uses the database connection pool, which is the most basic and controls the number of connection pools. Generally, the number of application servers is about 10, so that 1000 connections can support 100 application servers.

  2. Read/write splitting is clustered. The subject also said that the database itself can be expanded.

  3. Vertically split the database and make it service-oriented. for example, if a user has a database, an order database, and a user service and an order service are designed, only the user service can access the user database, other applications read and write user data through user services. orders are similar.

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.