JAVA JDBC连接Oracle数据库 进行压力测试
需求简单的测试功能同时开多个Thread连接Oracle数据库模拟多用户访问数据运行大量Thread(1000)时候会遇到Connectionresetjava.sql....
需求简单的测试功能 同时开多个Thread 连接Oracle数据库 模拟多用户访问数据
运行大量Thread(1000)时候会遇到Connection reset
java.sql.SQLException: IO 异常: Connection reset
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:404)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
at java.sql.DriverManager.getConnection(DriverManager.java:579)
at java.sql.DriverManager.getConnection(DriverManager.java:221)
at com.gemtek.dao.UserDao.DBConnection(UserDao.java:20)
at com.gemtek.dao.UserDao.Select(UserDao.java:43)
at com.gemtek.app.Application$WorkerThread.run(Application.java:54)
java.lang.NullPointerException
at com.gemtek.dao.UserDao.Select(UserDao.java:46)
at com.gemtek.app.Application$WorkerThread.run(Application.java:54)
请教大神这是什么问题 如何解决 展开
运行大量Thread(1000)时候会遇到Connection reset
java.sql.SQLException: IO 异常: Connection reset
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:404)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
at java.sql.DriverManager.getConnection(DriverManager.java:579)
at java.sql.DriverManager.getConnection(DriverManager.java:221)
at com.gemtek.dao.UserDao.DBConnection(UserDao.java:20)
at com.gemtek.dao.UserDao.Select(UserDao.java:43)
at com.gemtek.app.Application$WorkerThread.run(Application.java:54)
java.lang.NullPointerException
at com.gemtek.dao.UserDao.Select(UserDao.java:46)
at com.gemtek.app.Application$WorkerThread.run(Application.java:54)
请教大神这是什么问题 如何解决 展开
2个回答
2013-12-12
展开全部
你看看你的并发量多少,实时查看数据库的连接数。 估计就是太多了处理不过来了。。。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询