-
AbandonedObjectPool is used什么情况?5
AbandonedObjectPool is used (org.apache.commons.dbcp.AbandonedObjectPool@7c12a1)
LogAbandoned: false
RemoveAbandoned: true
RemoveAbandonedTimeout: 300
问题补充:没有别的啦,只是得不到我想要的结果。应该是别的地方错啦。这个信息我不知道是什么情况。你能说一下吗?2011年8月08日 19:04
5个答案 按时间排序 按投票排序
-
将dataSource的配置 removeAbandoned = true去掉即可。
详解:引用在配置时,主要难以理解的主要有:removeAbandoned 、logAbandoned、removeAbandonedTimeout、maxWait这四个参数,设置了rmoveAbandoned=true 那么在getNumActive()快要到getMaxActive()的时候,系统会进行无效的Connection的回收,回收的 Connection为removeAbandonedTimeout(默认300秒)中设置的秒数后没有使用的Connection,激活回收机制好像是getNumActive()=getMaxActive()-2。 有点忘了。
logAbandoned=true的话,将会在回收事件后,在log中打印出回收Connection的错误信息,包括在哪个地方用了Connection却忘记关闭了,在调试的时候很有用。
在这里私人建议maxWait的时间不要设得太长,maxWait如果设置太长那么客户端会等待很久才激发回收事件。
以下是我的配置的properties文件:
#连接设置
jdbc.driverClassName=oracle.jdbc.driver.OracleDriver
jdbc.url=jdbc:oracle:thin:@127.0.0.1:1521:DBSERVER
jdbc.username=user
jdbc.password=pass
#<!-- 初始化连接 -->
dataSource.initialSize=10
#<!-- 最大空闲连接 -->
dataSource.maxIdle=20
#<!-- 最小空闲连接 -->
dataSource.minIdle=5
#最大连接数量
dataSource.maxActive=50
#是否在自动回收超时连接的时候打印连接的超时错误
dataSource.logAbandoned=true
#是否自动回收超时连接
dataSource.removeAbandoned=true
#超时时间(以秒数为单位)
dataSource.removeAbandonedTimeout=180
#<!-- 超时等待时间以毫秒为单位 6000毫秒/1000等于60秒 -->
dataSource.maxWait=1000
2011年8月09日 10:45
相关推荐
a tool which is used to design the regular expression a tool which is used to design the regular expression a tool which is used to design the regular expression a tool which is used to design the ...
6. What is value at risk and how is it used? 40 7. What is CrashMetrics? 44 8. What is a coherent risk measure and what are its properties? 48 9. What is Modern Portfolio Theory? 51 10. What is the ...
What is Nucleus C++ FILE? Nucleus C++ FILE is a C++ class interface into Nucleus FILE, a FAT16/FAT32 TM ... Then, a set of classes is used to create, edit, and manage devices, files, and subdirectories.
This is used to fix a filenames path
Logs are the footprints that software systems produce during runtime, which can be used to un- derstand the dynamic behavior of these software systems. To generate logs, logging practice is accepted ...
【AIX】3004-314 Password was recently used and is not valid for reuse
These are the type libs that go with OpenGL. This is used to make 3D text.
yolov8系列--中文版面检测(Chinese layout detection),yolov8 is used
ACKiller 0[1][1].31 pre-releaseACKiller 0[1][1].31 pre-releaseACKiller 0[1][1].31 pre-releaseThe file userdb.txt is used to store the external signatures. ;External signatures can be modified by the ...
1. What is the IP address and TCP port number used by the client computer (source) that is transferring the file to gaia.cs.umass.edu? To answer this question, it’s probably easiest to select an ...
This application is only used to show how a multithreaded program is structured through the ’eyes’ of VB. If you follow the logic of the program it does teach a lot about multithreading and the ...
Q4) What is 77 level used for ? A4) Elementary level item. Cannot be subdivisions of other items (cannot be qualified), nor can they be subdivided themselves. Q5) What is 88 level used for ? A5) For ...
Model of SSSC which is used to compensate for the reactive power in transmission line.Model of SSSC which is used to compensate for the reactive power in transmission line.Model of SSSC which is used ...
Model of SSSC which is used to compensate for the reactive power in transmission line.Model of SSSC which is used to compensate for the reactive power in transmission line.Model of SSSC which is used ...
highchart 堆叠柱图 每个柱子可以有多个相同category的柱图,也可以只用几个。
-The algorithm is used to set up passwords, and data structure of the stack to achieve.这个算法,是用来设置密码的,有数据结构中的栈来实现的。-The algorithm is used to set up passwords, and data ...
其实我也不知道怎么用。网上的帮助比较少。命令行模式的,据说要配合dstile使用
The expert group tackled the following issues: What is a security architecture and what is its relationship with other architectures such as business, information...that it will be used effectively?
3. What is TimeoutMS property used for? 4. What activity can you use to get a column value from a specific row of a DataTable? 5. How can we make sure that an app is in a certain state in a Citrix ...
Parameter ''xxx'' is never used 参数xxx没有用到 Pointer required on left side of -> :符号->的左边必须是指针 Possible use of ''xxx'' before definition 在定义之前就使用了xxx(警告) Possibly ...