wrong reason
java.sql.SQLException: Cannot create PoolableConnectionFactory (Data source rejected establishment of connection, message from server: "Too many connections")
Mysql modify the my.ini configuration file, online statement: set the number of concurrent connections installed in the directory my.ini mysql too busy or system lead to the number of connections is full.
The project is actually deployed on linux system, you need to find the my.cnf configuration file, usually in the etc / my.cnf, find the file, add the following lines [mysqld] under:
set-variable=max_connections=1000 set-variable=max_user_connections=500 set-variable=wait_timeout=200
After the restart mysql, take effect.
1, start using the service:
service mysqld restart
service restart MySQL (version 5.5.7 Command)
2, using a script to start mysqld:
/etc/init.d/mysqld restart
max_connections: to set the maximum number of connections
max_user_connections: The maximum number of users per connection setup 500
wait_timeout: 200 seconds will represent close idle connections, but is working connections are unaffected.
Check whether connections are modified
show variables like '%connection%'
View the number of server threads
show global status like 'Thread%';
All users are currently connected. If other common account, only to see their occupancy connection.
show full processlist