Workaround for MySQL 1040 error too many connections
1. May be the problem with MySQL max connections setup
2. It is possible that multiple insert,update operations have not closed the session and need to configure transaction support in spring.
Solve:
1. Change the time-out time of the session in Tomcat to 20, (not required)
2. Transaction support for operations with large processing volumes for database insert or update.
=======================================
The following are the workarounds:
Com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:Data Source rejected establishment of Connection, message from server: "Too many connections"
Reason: www.2cto.com
Because the number of concurrent connections set in the My.ini in your MySQL installation directory is too low or the system is busy causing the number of connections to be full
How to resolve:
Open MySQL install directory open My.ini find Max_connections (in about line 93rd) default is 1001 like set to 500~1000 more appropriate, restart MySQL, so 1040 error is solved.
max_connections=1000
Be sure to restart MySQL to take effect
Cmd->
net stop MySQL
net start MySQL
Questions about the inability to start MySQL after changing innodb_log_file_size
Www.2cto.com
Innodb_buffer_pool_size=768m
innodb_log_file_size=256m
Innodb_log_buffer_size=8m
innodb_additional_mem_pool_size=4m
Innodb_flush_log_at_trx_commit=0
Innodb_thread_concurrency=20
The above is the initial optimization of the InnoDB engine, found that the update innodb_log_file_size=256m when there is a problem, as long as the addition of this will not start,
Later only to know the original to stop the service first, and then delete the original file ...
Open/mysql Server 5.5/data
Delete Ib_logfile0, Ib_logfile1........ib_logfilen
Turn on the option again to start successfully.
Workaround for MySQL 1040 error too many connections