message from server: "Too many connections"
SSH项目里面出现这个错误:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Data source rejected establishment of connection, message from server: "Too many connections"
以为是没有关闭Session,经过检查,给所有的this.getSession()都加上了this.getSession().close(),还是会报这个错误。
这是一个心跳包的Action,每隔几秒钟就会发一个HTTP请求,Action设置成多例,难道要设置成单例才不会报这个错误?