https://blog.csdn.net/weixin_34367257/article/details/91747865

 

一:场景

tomcat数据源连接oracle数据库,不断出现连接数爆满,导致数据库挂掉

二:解决办法

参考文章 http://www.tuicool.com/articles/AbUNj27

也就是在tomcat context.xml配置文件中,添加三个属性

maxWait="2000"  //单位毫秒

removeAbandoned="true"  

removeAbandonedTimeout="180"   //单位秒

即增加连接池回收机制,活动连接,在超过时间内,没有使用,会被自动回收

 

转载于:https://my.oschina.net/baishi/blog/790138

相关文章:

  • 2022-01-08
  • 2021-04-15
  • 2022-12-23
  • 2022-01-08
  • 2021-11-20
  • 2022-01-08
猜你喜欢
  • 2022-01-13
  • 2022-01-08
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2021-10-10
相关资源
相似解决方案