How to Resolve ?
Case 1:
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Data source rejected establishment of connection, message from server: “Too many connections”
or Case 2:
MySQL ERROR 1404 : Too many connections
- Login as root or admin account .
- execute
show global variables like 'max_connections' Out put would be like this : +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | max_connections | 151 | +-----------------+-------+ 1 row in set (0.00 sec)
if your database connections exceed the number these error can be occurred.
-
Solution is here set max_connections as below: SET GLOBAL max_connections = 250;
Hope your fix is done. 🙂

Leave a comment