oracle数据连接超时

k111111 发布于 2016/02/26 16:00
阅读 1K+
收藏 0

MySQL连接为什么挂死了?别踩坑!>>>

在本地自己部署的oracle通过win平台和linux平台都可以正常连接数据库,但是到客户现场之后就出错,数据连接超时,日志信息大致如下:

2016-02-18 07:59:21,339 ERROR DefaultQuartzScheduler_Worker-7 com.nantian.cbs.login.AutoClearAction - 数据库操作异常,堆栈信息如下:
org.springframework.dao.DataAccessResourceFailureException: StatementCallback; SQL [select count(*) from bs_company t where t.status = '3' and t.login_times >='3']; Io 异常: Socket read timed out; nested exception is java.sql.SQLException: Io 异常: Socket read timed out
Caused by: java.sql.SQLException: Io 异常: Socket read timed out
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:254)
at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:819)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1048)
at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:844)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1153)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1312)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:389)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:342)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:404)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:412)
at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:420)
at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:425)
at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:434)
at com.nantian.cbs.login.LoginDao.queryLockUser(LoginDao.java:239)
at com.nantian.cbs.login.AutoClearAction.autoClear(AutoClearAction.java:25)
at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:283)
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:272)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
2016-02-18 07:59:21,339 INFO DefaultQuartzScheduler_Worker-7 com.nantian.cbs.login.AutoClearAction - 自动解锁用户完毕,耗时[21325 ms]
2016-02-18 08:00:00,012 INFO DefaultQuartzScheduler_Worker-8 com.nantian.cbs.login.AutoClearAction - 开始自动解锁用户。。。。
2016-02-18 08:00:00,043 INFO DefaultQuartzScheduler_Worker-8 com.nantian.cbs.login.LoginDao - size-->0
2016-02-18 08:00:00,043 INFO DefaultQuartzScheduler_Worker-8 com.nantian.cbs.login.LoginDao - size1-->0
2016-02-18 08:00:00,043 INFO DefaultQuartzScheduler_Worker-8 com.nantian.cbs.login.LoginDao - size1-->0

加载中
0
wenshao
wenshao
推荐你用阿里巴巴开源数据库连接池druid,性能更好,稳定,监控功能强大,能防SQL注入。 https://github.com/alibaba/druid/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98
0
k
k111111
谢谢!我试试
返回顶部
顶部