Handling of MYSQL Too connector connections

Source: Internet
Author: User


When the program throws an exception:
Cocould not get JDBC Connection; nested exception is com. mysql. jdbc. exceptions. mySQLNonTransientConnectionException: Data source rejected establishment of connection, message from server: "Too connector connections" www.2cto.com 1. log on to MYSQL and go to the mysql/bin directory: mysql-u root-p Enter password: (Enter the password) where-u is followed by the user name, and-p requires a password, press enter and enter the password. In Mysql, You can query the user and session information of the current Mysql database connection as follows:
1. show full processlist; (if too many are displayed, enter show processlist;) to check which database is indirectly too large. www.2cto.com 2. modify the number of database connections: Modify/etc/my. number of connections in cnf:
Max_connections = 20000 (this depends on the status of your service) is directly added to the following [mysqld]. If the modification is still too large after a while, it means the most connected databases in processlist are displayed, check whether the program connecting to the database is stuck.
 

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.