Correlation between abandonedobjectpool

Source: Internet
Author: User
What is the situation of abandonedobjectpool is used?

Abandonedobjectpool is used (Org. Apache. commons. DBCP. abandonedobjectpool @ 7c12a1)
Logabandoned: false
Removeabandoned: True

Removeabandonedtimeout: 300

Remove removeabandoned = true from datasource configuration.
Details:

During configuration, the following parameters are hard to understand: removeabandoned, logabandoned, removeabandonedtimeout, and maxwait. If rmoveabandoned = true is set, the getnumactive () is about to reach getmaxactive () the system recycles invalid connections. The recovered connection is the connection that is not used after the number of seconds set in removeabandonedtimeout (300 seconds by default). Activating the recycle mechanism seems to be getnumactive () = getmaxactive ()-2. A little forgotten.
If logabandoned is set to true, the error message for recycling the connection will be printed in the log after the event is recycled, including where the connection is used but the connection is disabled, it is useful for debugging.
We recommend that you do not set the time for maxwait to be too long. If you set the time for maxwait to be too long, the client will wait for a long time to trigger the collection event.
The following is the properties file of my Configuration:
# Connection settings
JDBC. driverclassname = oracle. JDBC. Driver. oracledriver
JDBC. url = JDBC: oracle: thin: @ 127.0.0.1: 1521: dbserver
JDBC. Username = user
JDBC. Password = pass

# <! -- Initialize the connection -->
Datasource. initialsize = 10

# <! -- Maximum idle connection -->
Datasource. maxidle = 20

# <! -- Minimum idle connection -->
Datasource. minidle = 5

# Maximum number of connections
Datasource. maxactive = 50

# Whether to print the connection timeout error when the timeout connection is automatically recycled
Datasource. logabandoned = true

# Automatic Recovery of timeout connections
Datasource. removeabandoned = true

# Timeout (in seconds)
Datasource. removeabandonedtimeout = 180

# <! -- The timeout wait time is measured in milliseconds. The unit is 6000 milliseconds/1000 is equal to 60 seconds. -->
Datasource. maxwait = 1000 bytes failed to: http://blog.csdn.net/demon_chin/article/details/7998610

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.