ORA-12518: TNS:listener could not hand off client connection这种错误一般是在测试数据库并发性的,多个用户的,后台用servle
ora-12518: tns:listener could not hand off client connection
这种错误一般是在测试数据库并发性的,多个用户的,
后台用servlet方法执行个update ,只不过updated的记录为1100个,后台一直报这个错误,
我也更改了Oracle的连接数为1200,但是当执行到356行的时候,还是报上述的错误
解决方案:程序代码的问题,执行更新后,没有关闭连接,囧,切记关闭连接
public boolean update(Department e) {
boolean flag = true ;
String updateSQL = "update department set sort="+e.sort+" where id = " + e.getId();
try {
stmt.executeUpdate(updateSQL);
} catch (Exception e1) {
e1.printStackTrace();
flag = false ;
}
return flag ;
}
public boolean update(Department e) {
boolean flag = true ;
String updateSQL = "update department set sort="+e.sort+" where id = " + e.getId();
try {
stmt.executeUpdate(updateSQL);
} catch (Exception e1) {
e1.printStackTrace();
flag = false ;
}finally{
stmt.close; //切记关闭
conn.close; //切记关闭
}
return flag ;
}
以前的程序代码量小也没发觉到不关闭的危害,这次终于尝试到了,而且还花费了半天的时候找其他的原因,,福祸相依,同时也发现了oracle的小秘密——并发性测试
在CentOS 6.4下安装Oracle 11gR2(x64)
Oracle 11gR2 在VMWare虚拟机中安装步骤
Debian 下 安装 Oracle 11g XE R2
本文永久更新链接地址:

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号