Mysql的错误,待解决[已解决]Data source rejected establishment of connection message from server: "Too many connections";
[15:22:53,461] [CustomExceptionHandler,44] - Handle Exception:Hibernate operation: Cannot open connection; uncategorized SQLException for SQL [???]; SQL state [08004]; error code [1040]; Data source rejected establishment of connection message from server: "Too many connections"; nested exception is java.sql.SQLException: Data source rejected establishment of connection message from server: "Too many connections"
org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLException for SQL [???]; SQL state [08004]; error code [1040]; Data source rejected establishment of connection message from server: "Too many connections"; nested exception is java.sql.SQLException: Data source rejected establishment of connection message from server: "Too many connections"
java.sql.SQLException: Data source rejected establishment of connection message from server: "Too many connections"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1906)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:2535)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:817)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1782)
at com.mysql.jdbc.Connection.<init>(Connection.java:450)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:291)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:277)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:259)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:241)
at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:80)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:315)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:109)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
at org.hibernate.loader.Loader.doQuery(Loader.java:661)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2150)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:300)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:146)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1093)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at com.easou.framework.dao.hibernate.BaseDAOHibernate.pageListQuery(BaseDAOHibernate.java:164)
at com.vitamin.cn.manager.news.dao.hibernate.NewsDAOHibernate.searchNews(NewsDAOHibernate.java:38)
at com.vitamin.cn.manager.news.bl.impl.NewsManagerImpl.searchNews(NewsManagerImpl.java:24)
at com.vitamin.cn.manager.news.action.NewsAction.listNews(NewsAction.java:88)
at com.vitamin.cn.manager.news.action.NewsAction.execute(NewsAction.java:35)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.easou.framework.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:88)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
解决办法:修改mysql的下面my.ini文件
max_connections=1000
重启mysql
cmd进入
net stop mysql
net start mysql
再次启动maven无问题
分享到:
相关推荐
MySQL数据库在运行过程中可能会遇到“Too many connections”的错误提示,这意味着服务器上的MySQL实例达到了其最大允许的并发连接数。此问题通常由以下两种情况引起: 1. **并发连接过多**:大量的应用程序或用户...
MySQL错误“Too many connections”是数据库用户在尝试建立新的连接时遇到的一个常见问题。这个错误表明MySQL服务器已经达到了其允许的最大并发连接数,通常默认设置为100个。当数据库连接未正确关闭,或者应用程序...
本文讨论了 Nginx 访问慢和 accept() failed 错误的解决方案,包括临时修改 ulimit 值、永久修改 ulimit 值、修改 nginx.conf 文件、影响 MySQL 并发连接数等方法。通过这些方法,可以解决 Nginx 连接过多的问题,...
当遇到`com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Data source rejected establishment of connection, message from server: "Too many connections"`这样的异常时,说明MySQL服务器...
当遇到“Too many connections”这样的错误时,意味着数据库连接达到了其最大允许连接数,无法处理更多的连接请求。本案例实战将深入探讨如何定位并解决此类问题。 首先,我们需要理解数据库连接池的工作原理。连接...
默认值100,如果经常出现“Too many connections”错误,应考虑增大此值。 5. **record_buffer**: 每个顺序扫描的线程为其扫描的每个表分配的缓冲区大小。增加它可优化顺序扫描操作。 6. **sort_buffer**: 用于...
在稳定性方面,丁奇提到了如何处理连接数问题,例如推荐使用长连接还是短连接,以及如何预防和解决too many connections的问题。他还提到了源码改造,如root connection总是可用的实现,以及长连接资源消耗、选择性...
6. **连接池问题**:连接池管理不当可能导致“DB too many connections”或“get connection timeout”的问题。未使用线程池时,随着连接数增加,性能会急剧下降。需要合理设置连接池大小,并确保及时归还连接,避免...
6. Mysql 的错误:Data source rejected establishment of connection message from server: "Too many connections"。 解决方法:检查 Mysql 的 max connections 设置,避免多次 insert、update 操作没有关闭 ...
configuring many of the aspects of PHP's behavior. ; PHP attempts to find and load this configuration from a number of locations. ; The following is a summary of its search order: ; 1. SAPI module ...
然而,在使用过程中,可能会遇到一些问题,如数据库连接资源无法释放,导致“Too many connections”错误。本文将深入探讨这个问题的原因以及解决方案。 当CI框架在处理大量并发请求时,如果每个请求都创建一个新的...
- **答案**:如果设置过低,则在高并发场景下可能会出现“Too many connections”的错误提示,导致新的请求无法正常建立连接。 **Q2:过高设置会有哪些负面影响?** - **答案**:过高设置可能会导致服务器资源过度...
It is handy in studying database programming.<END><br>20 , MySQLExplorer.zip Explorer for MySQL Data Base.You can retrieve and execute your query. <END><br>21 , ICDBaseSource115.zip DAO based ...