Weblogicconnection leak connection pool leakage solution

Source: Internet
Author: User
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-> connection, click Advanced options to modify the following configuration item status:
Configuration item name
Default Value
Change
Description
Enable connection leak profiling
Disable
Enable
Enable connection pool leakage monitoring.
Enable connection profiling
Disable
Enable
Enable connection pool monitoring.
Inactive connection timeout
0
100
If the connection is not active within the specified time period (in seconds), WebLogic releases it and recycles it to the connection pool.
2. After the preceding configuration item is modified, the running application is not affected, and the server or application does not need to be restarted (no small yellow icon before the configuration item <! -- [If! VML] --> <! -- [Endif] --> WebLogic clearly tells us that this configuration does not need to be restarted. However, when monitoring is enabled, it may have some impact on performance. I have not tested the impact, but enabling these settings is temporary, after obtaining the log, we can restore the configuration to the default value.
Before the connection pool leakage problem is solved, if there is no request, the connection pool will remain 0, and there will be no connection pool full, causing the request to fail to respond, so we do not have to worry about getting scolded again, it also earned us time to solve the problem.
Well, the following is the key.
After a while, open % servername % in the BEA/user_projects/domains/% domainname %/% servername % directory. log, search, "a jdbc pool connection leak was detected", if WebLogic has detected a connection pool leakage, you can find the following log, it also clearly tells us which line of code in which class has created a connection, but it is not closed (note the bold red font ):
11:47:20 A.M. CST warning jdbc a jdbc pool connection leak was detected. A connection leak occurs when a connection obtained from the pool was not closed explicitly by calling close () and then was disposed by the garbage collector and returned to the connection pool. the following stack trace at create shows where the leaked connection was created. stack trace at connection create:
At weblogic. JDBC. wrapper. poolconnection. INIT (poolconnection. Java: 75)
At weblogic. JDBC. Pool. Driver. allocateconnection (driver. Java: 254)
At weblogic. JDBC. Pool. Driver. Connect (driver. Java: 84)
At weblogic. JDBC. JTs. Driver. getnontxconnection (driver. Java: 546)
At weblogic. JDBC. JTs. Driver. Connect (driver. Java: 140)
At weblogic. JDBC. Common. Internal. rmidatasource. getconnection (rmidatasource. Java: 344)
At com. CP. FW. Dao. basedao. getconnection (basedao. Java: 78)
At com. CP. FW. Dao. dataset. datasetop. INIT (datasetop. Java: 78)
At com. CP. FW. Dao. dataset. datasetop. <init> (datasetop. Java: 45)
At com. CP. Ia. util. workflowutil. getnextwrokflowid (workflowutil. Java: 93)
At
 
Another method:
On the Weblogic console, expand % domainname %-> servers-> % servername %, select the logging-Server Page, and click "view server log" at the bottom of the page ", you can also find the same log by searching for "a jdbc pool connection leak was detected.
WebLogic description of log events:
Message ID
BEA-001074
Subsystem
JDBC
Message
A jdbc pool connection leak was detected.
Connection leak occurs when a connection obtained
From the pool was not closed explicitly by calling
Close () and then was disposed by the garbage
Collector and returned to the connection pool.
Following stack trace at create shows where
Leaked connection was created. stack trace
Connection create:
Detail
A jdbc pool connection leak was detected.
Connection leak occurs when a connection obtained
From the pool was not closed explicitly by calling
Close () and then was disposed by the garbage
Collector and returned to the connection pool.
Stack trace is printed indicating where the leaked
Connection was created.
Cause
A jdbc pool connection leak was detected.
Connection leak occurs when a connection obtained
From the pool was not closed explicitly by calling
Close () and then was disposed by the garbage
Collector and returned to the connection pool.
Stack trace is printed indicating where the leaked
Connection was created.
Action
Close the connection appropriately
Through the previous operations, we can check the bug of our program. by fixing the bug, we can finally solve the problem of connection pool leakage ~
Related Article

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.