Alibabacloud.com offers a wide variety of articles about tomcat connection pool monitoring, easily find your tomcat connection pool monitoring information here online.
connected to the database, so that frequent Connection boxes are avoided. However, these connection objects occupy a certain amount of memory space. Therefore, we need to consider the maximum number of connections in the connection pool based on the concurrent access traffic of the database and the hardware conditions
Today encountered the data source connection pool configuration problems, found that there are many ways to configure, now summarized below, I hope to be helpful: (MySQL database as an example)One, tomcat configuration data Source:Mode one: Under the Webroot to build a folder Meta-inf, inside a file Context.xml, the contents are as follows:Maxactive= "maxidle=" "
By default, WebLogic does not record this leakage log and only reports JDBC errors.
Part of the following content is reproduced, part is the actual encountered, but the solution steps are the same, the original address: http://blog.csdn.net/esky2000/archive/2008/07/22/2689929.aspx
1. Modify
Log on to the Weblogic console, and choose % domain %-> services-> JDBC-> connection pools-> JDBC/IOA.
Configuration page-> c
Article Title: Tomcat4 database connection pool configuration. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
This article describes how to configure the database connection pool i
wait until it is used up, you can return the connection to the connection pool by calling the close () method of connection, in this way, the connection object is programming idle, and you can wait for the next connection request
1. traditional links (as shown below): (1) the number of connections required to connect DriverManager in traditional methods is limited. (2) The traditional method of close () does not reuse the Connection, but only cut off the bridge between the application and the database, that is, no SQL command is sent to the database to execute 1. traditional link (as shown below)
Note:
(1). The traditional method of finding DriverManager to connect is limite
the Tomcat boot file catalina.sh, add-agentlib:jprofilerti=port= 8849-xbootclasspath/a:/opt/jprofiler4/bin/agent.jar content into catalina_opts; "-agentlib:jprofilerti=port=8849- Xbootclasspath/a:/opt/jprofiler4/bin/agent.jar "This content is generated by the client software catalina_opts=" $CATALINA _opts-xms128m-xmx128m $JPDA _ Opts-agentlib:jprofilerti=port=8849-xbootclasspath/a:/opt/jprofiler4/bin/agent.jar "7.Reboot Linux and startup
-establishing one.How database connection pooling works Benefits of database connection pooling technologyResource reuse; Faster system response speed; New means of resource allocation; Unified connection management to avoid database connection leaks.Two open-source database conne
. Therefore, we want to determine the maximum number of connections in the connection pool based on the concurrency of the database and the hardware conditions of the server. Data sources and connection pools, one for creating connection objects, and one for managing connection
user disconnects (the 11th to 20th connection), The connection will not be released immediately, but it will need to wait 10000 milliseconds (the maximum wait time) before it is released and 10 connections remain in the connection pool when no user is connected.
In development, the
MySql database connection pool
1. Traditional links (as shown below)
Note:
(1). the traditional method of finding DriverManager to connect is limited.
(2). the traditional method of close () does not reuse the Connection, but only cut off the bridge between the application and the database, that is, no SQL command is sent to the database for execution.
(3) In th
(Turn around, source address: http://www.jmatrix.org/notes/1067.html)Recently, I wondered if it was possible to continuously collect the performance information of the Tomcat server itself by adding a tomcat extension, such as the data of the thread pool, the number of requests, and so on, so as to be able to coordinate with the
-pre1.jar, Mchange-commons-0.2.jar, if you are working with an Oracle database, you also need to import C3p0-oracle-thin-extras-0.9.2-pre1.jar2, in the class directory to add c3p0 configuration file: C3p0-config.xml The configuration information for the C3p0-config.xml is as follows: 3. Create a pool in a static code block for a tool class (such as Jdbcutils) that gets a database connection Addition
() init_count) Pool.addlast (connection); Else{
Try{connection.close (); } Catch(SQLException e) {Throw NewRuntimeException (e); } Curr_count--; }
}
}2.DBCP Connection Pool ComponentsDBCP is an open source connection pool implementation under the Apache Soft
) Implement the Getconnection method, let the Getconnection method each call, from LinkedList to take a connection back to the user.(3) When the user finishes using connection and calls the Connection.close () method, the collection object should ensure that it returns itself to the LinkedList instead of returning the conn to the database.(4) Collection guarantee to return to the LinkedList is the difficult
1. Traditional links (below)
Attention:
(1). The traditional way to find DriverManager to connect, the number is limited.
(2). The traditional way of close (), and did not reuse connection, just cut off the application and Database bridge, that is no send to SQL command to the database side execution
(3). In the project, for connection not to say, do not use the DriverManager directly, and u
1. Connection Pooling Overview(1) Use the pool to manage the connection so that the connection can be reused;(2) There is a pool, so we do not have to create connection ourselves, but through the
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.