Too Many connections

Source: Internet
Author: User
Tags mysql tutorial

Too many connections

Error Number: 1040

Problem Analysis:

The number of connections exceeds the value set by the MySQL tutorial and is related to both max_connections and wait_timeout. The larger the value of the wait_timeout, the longer the idle wait for the connection, which causes the current number of connections to become larger.


To the C:windows directory (under Windows 2000 for Winnt), locate the My.ini file open.

Add under [Mysqld] in the My.ini file
Set-variable = max_connections= 10000

Then save modification saves the changes.
Finally, the MySQL can be restarted once.


Workaround:

1, the virtual host user please contact space business to optimize the MySQL server configuration;

2, independent host users please contact the server administrator to optimize the MySQL server configuration, can refer to:

Modify the parameters in the MySQL configuration file (My.ini under Windows, MY.CNF under Linux):

max_connections= 1000
Wait_timeout = 5

MySQL more than 5.1 of the modified file

You can increase this value in the main config file (e.g.,/ETC/MY.CNF) using this syntax:

[Mysqld]
set-variable=max_connections=250
Wait_timeout = 55 Code How long since this connection is discarded

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.