We is already in the process of making n+ connections and the number of simultaneous builds have bee

Source: Internet
Author: User


Simultaneous-build-throttle:
This is the maximum number of connections we can are building at any one time.
That's, the number of new connections that has been requested but aren ' t yet available for use.
Because connections can be built using more than one thread (for instance, when they is built on demand)
and it ta Kes a finite time between deciding to build the connection and it becoming available we need some
on ensuring that A lot of threads don ' t all decide to build a connection at once. (We could solve this in a
smarter Way–and indeed We'll one day) the Default is 10. The
is the maximum number of connections that can (at the same time) be established at any one time, that is, the number of new connections that have been requested but not yet available. Because connections can be built with multithreading,
it takes a while to decide to make a connection to a connection, so we need some way to avoid a large number of threads trying to establish a connection at the same time.
(we should have found a smarter way to solve this problem, one day we'll find it.) The default value is ten
when I use 140 users, when I do stress testing, I find that there will be more than 10 requests to establish a connection at the same time, when the number of requests exceeds the defined value, There will be a connection failure condition.
Therefore the conclusion is that when the database concurrent connection may be higher than the application, this value should be set up appropriately.
If the concurrent request is high, a bug that may occur is

caused By:java.sql.SQLException:We is already in the process of making one connections and the number of simultaneous BU Ilds have been throttled to 10

Maximum-active-time:
If The housekeeper comes across a thread that have been active for longer than this then it would kill it. So make sure the set this to a number bigger than your slowest expected response! Default is 5 minutes.
If a thread is active longer than this value, the thread is killed. So make sure the value is set to be longer than the slowest response time. The default is 5 minutes. The daemon kills the extra available threads in the connection pool (unused, over this time), and the number of connections that are eventually retained is the number specified by Minimum-connection-count. The daemon is checked against the time interval set by the House-keeping-sleep-time parameter.

Maximum-connection-lifetime:
The maximum amount of time, a connection exists for before it is killed (milliseconds). Default is 4 hours.
Refers to the maximum lifetime of a connection (in milliseconds) over which the connection is killed. The default value is 4 hours.

Overload-without-refusal-lifetime:
This helps us determine the pool status. If we have refused a connection within this threshold (milliseconds) then we are overloaded. Default is seconds.
This parameter helps us determine the state of the connection pool, which is considered overloaded if a connection is rejected within this time threshold (in milliseconds). The default value is 60.


Alias: Aliases for data sources

Driver-url:url connection string, the user name and password must be determined

Driver-class: Driver name

Username: username (proxool not used, but not available)

Password: password (proxool not used, but not not)

Maximum-new-connections: No idle connection can be allocated and the maximum number of requests waiting in the queue will not be accepted for user connections that exceed the number of requests

Test-before-use:

If you set the connection true then each of the is tested (with whatever are defined in House-keeping-test-sql) before being S Erved. If A connection fails then it's discarded and another one is picked. If All connections fail a new one is built. If that one fails then you get a SQLException saying so.

If the connection pool is running, the network or database failure can not connect to the database, after the return to normal, because the connection is persisted in the connection pool, the connection is still not available, the connection pool connection is actually a bad connection, how to let the connection pool can automatically re-connect to clear these bad connections? As long as the Test-before-use parameter is configured, that is, each pull-out connection checks that the connection is available, you can enable the connection pool to automatically reconnect after a failure recovery

It should be noted that the MySQL database must also be added to the connection parameters Autoreconnect=true parameters, or even if the Test-before-use parameter is open, still can not be re-connected!

Fatal-sql-exception:

It is a comma-delimited piece of information. When an SQL exception occurs, his exception information is compared to this fragment of information. If present in the fragment, the exception will be considered a fatal error (Fatal SQL Exception). In this case, The database connection is about to be discarded. No matter what happens, this exception will be re-thrown to provide the consumer. It is best for users to configure a different exception to throw.


Fatal-sql-exception-wrapper-class:

As mentioned above, you'd better configure a different exception to re-throw. With this attribute, the user can wrap the SqlException and make him another exception. This exception or inheritance The SqlException or inherited word Runtimeexception.proxool comes with 2 implementations: ' Org.logicalcobwebs.proxool.FatalSQLException ' and ' org. Logicalcobwebs.proxool.FatalRuntimeException '. The latter is more appropriate.


House-keeping-sleep-time:

Proxool automatically detects the time interval (milliseconds) of each connection status, detects the idle connection and reclaims it immediately, and destroys the default of 30 seconds.

House keeper retains the maximum amount of time a thread sleeps, and house keeper's job is to check the status of each connection and determine whether it needs to be destroyed or created.


House-keeping-test-sql:

If an idle database connection is found. House keeper will be tested with this statement. This statement is best executed very quickly. If there is no definition, the test process will be ignored.

General MySQL available select Sysdate, Oracle available select Sysdate from dual or select 1 from dual


Injectable-connection-interface: A method that allows Proxool to implement the connection object being proxied.


Injectable-statement-interface: Allows Proxool to implement the statement object method being proxied.


Injectable-prepared-statement-interface: Allows Proxool to implement the PreparedStatement object method being proxied.


Injectable-callable-statement-interface: Allows Proxool to implement the CallableStatement object method being proxied.


JMX: Slightly


Jmx-agent-id: Slightly


Jndi-name: Name of the data source


Maximum-active-time: If housekeeper detects that the active time of a thread is greater than this number. It will kill this thread. So confirm the bandwidth of your server. Then set a suitable value. The default is 5 minutes.


Maximum-connection-count:

The maximum number of connections to the database. Default is 15.

The maximum number of database connections. Default is 15


Minimum-connection-count: Minimum number of database connections, default is 5


Prototype-count:

If There is fewer than this number of connections available then we'll build some more (assuming the maximum-connection -count is not exceeded). For example. of We have 3 active connections and 2 available, but we prototype-count are 4 then it would attempt to build another 2. This differs from Minimum-connection-count because it takes to account the number of active connections. Minimum-connection-count is absolute and doesn ' t care how many be in use. Prototype-count is the number of spare connections it strives to keep over and above the ones, which is currently active. Default is 0.

The number of connections available in the connection pool. If the connection in the current connection pool is less than this number. The new connection will be established (assuming no more than the maximum available number). For example, we have 3 active connections with 2 available connections, and our prototype-count is 4, Then the database connection pool will attempt to establish an additional 2 connections. This is different from Minimum-connection-count. The Minimum-connection-count also calculates the connection of the activity. Prototype-count is the number of spare connections.


Recently-started-threshold: Slightly

Statistics: Connection pool usage statistics. Parameter "10s,1m,1d"

Statistics-log-level: Log statistics trace type. Parameter "ERROR" or "INFO"

Test-after-use: Slightly

Trace: If true, then each executed SQL statement will be logged at the execution time (DEBUG level). You can also register a connectionlistener (see Proxoolfacade) to get this information.

Verbose: Details settings. parameter bool Value

We is already in the process of making n+ connections and the number of simultaneous builds have bee

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.