mysql出现Connection.close() has already been called. Invalid operation in this state.
来源:互联网 发布:wps数据有效性设置取消 编辑:程序博客网 时间:2024/06/07 04:55
今天上服务器发现tomcat 里面报如下错误 但是网站并没有挂 后来找了原来
16-Nov-2016 11:43:08.437 警告 [http-nio-8989-exec-5] com.mchange.v2.c3p0.impl.NewPooledConnection.handleThrowable [c3p0] A PooledConnection that has already signalled a Connection error is still in use!
16-Nov-2016 11:43:08.437 警告 [http-nio-8989-exec-5] com.mchange.v2.c3p0.impl.NewPooledConnection.handleThrowable [c3p0] Another error has occurred [ com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:Connection.close() has already been called. Invalid operation in this state. ] which will not be reported to listeners!com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Connection.close() has already been called. Invalid operation in this state.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.Util.getInstance(Util.java:381)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:984)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
at com.mysql.jdbc.ConnectionImpl.getMutex(ConnectionImpl.java:3032)
at com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:4606)
原来是数据库连接被关闭了,网上找一下可以通过设置wait_timeout来解决。
我查了下
默认是28800 然而我服务器上却不是
查了下这么小肯定要报错啊
使用命令加大设置即可
mysql> set global wait_timeout=28800;
Query OK, 0 rows affected
mysql> show global variables like 'wait_timeout';
然后就可以了
0 0
- mysql出现Connection.close() has already been called. Invalid operation in this state.
- mysql Connection.close() has already been called
- getOutputStream() has already been called for this
- 数据库操作的异常Cannot perform this operation because the connection pool has been close
- jsp出现getOutputStream() has already been called for this response异常的原因和解决方法
- jspSmartUpload下载文件,出现getOutputStream() has already been called for this response 错误
- JSP文件下载及出现getOutputStream() has already been called for this response的解决方法(转)
- tomcat5下jsp出现getOutputStream() has already been called for this response
- jspsmart下载文件出现getOutputStream() has already been called for this response的解决
- tomcat5下jsp出现getOutputStream() has already been called for this response
- jspSmartUpload下载文件,出现getOutputStream() has already been called for this response 错误
- 导出Excel出现getOutputStream() has already been called for this response异常的原因
- jsp出现getOutputStream() has already been called for this response异常的原因和解决方法
- 用jsp页面实现验证码出现getOutputStream() has already been called for this response
- 用jsp页面实现验证码出现getOutputStream() has already been called for this response
- jsp出现getOutputStream() has already been called for this response异常的原因和解决方法
- jsp出现getOutputStream() has already been called for this response异常的原因和解决方法
- JSP文件下载及出现getOutputStream() has already been called for this response的解决方法
- vimrc文件的配置
- LeetCode 12. Integer to Roman
- js闭包
- 机器人驱动介绍(2)
- 加载 Logo 动画 试玩
- mysql出现Connection.close() has already been called. Invalid operation in this state.
- 图像显示
- 关于伺服电机的控制方式
- 自动化运维的基石CMDB
- canvas开发专题-第二天
- Mysql ID生成器
- Oracle迭代查询无限下级
- 数据存储/加载指令
- IP:网际协议中的二进制反码求和算法。。