【发布时间】:2013-03-26 15:56:10
【问题描述】:
我使用 spring、hibernate 和 Jaxb 做了一个 Java 应用程序。
JDBCExceptionReporter - SQL Error: 0, SQLState: 08001
JDBCExceptionReporter - Could not create connection to database server. Attempted reconnect 3 times. Giving up.
JDBCExceptionReporter - SQL Error: 0, SQLState: 08001
JDBCExceptionReporter - Could not create connection to database server. Attempted reconnect 3 times. Giving up.
当我尝试通过循环多次连接数据库时出现上述错误。它适用于最多 50 个请求但在循环超过 50 个时会出现错误。
我正在使用 java 1.7 和 Tomcat 7.0
【问题讨论】:
-
使用连接池概念
-
尝试关闭你的连接
-
请显示包含连接的代码。
标签: java mysql hibernate tomcat