See a MySQL face question

Source: Internet
Author: User

Now because the turnout is too many, the website often appears too many connection error, how to solve

Increase the maximum number of MySQL connections: MySQL The default number of connections is 100, this is a lot of concurrent connection to the database application is not enough, so we can modify it, edit My.ini max_connections=1000

Since the database is invoked with a MySQL statement, a temporary variable ($conn) is used to open the database each time the statement is executed, so when you use the MySQL statement, you remember to close the MySQL temp variable after each call to MySQL.

or without a database, write the data directly to a file. For very large access, it is not recommended to use a database, you can write the data you want to write to several created files, and then import the database together.

See a MySQL face question

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.