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.