<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    itstarting:IT進行時

    想自己所想,做自己所愛

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      28 隨筆 :: 3 文章 :: 55 評論 :: 0 Trackbacks

    解決連接池泄漏步驟

    登錄weblogic console,  %Domain% -> Services -> JDBC -> Connection Pools -> jdbc/ioa

     

    Configuration -> Connection, 點開Advanced Options, 修改以下配置項狀態:

     

    配置項名稱

    默認值

    修改為

    說明

    Enable Connection Leak Profiling

    禁用

    啟用

    開啟連接池泄漏的監控。

    Enable Connection Profiling

    禁用

    啟用

    開啟連接池監控。

    Inactive Connection Timeout

    0

    100

    連接在指定時間內(單位:秒)沒有活動的話,WebLogic會將之釋放并回收到連接池。

     

        以上配置項修改后不影響在跑的應用,不需要重啟服務器或應用(配置項前沒有黃色小圖標 <!--[if !vml]--><!--[endif]-->WebLogic很明確的告訴我們這個配置是不需要重啟的),所以大可放心設置。只是啟用監控后會對性能有一些影響,具體影響會有多大,我沒有測試過,但開啟這些設置只是暫時的,得到日志后我們就可以把配置還原會默認值。

    在沒有解決連接池泄漏問題之前,如果沒有請求時連接池將一直保持為0,不會再有連接池滿造成請求無法響應的問題,我們也不用擔心再挨客戶罵,也為我們解決問題爭取了寶貴到時間。

     

           好了,下面才是關鍵。

     

           過一段時間后,在bea\user_projects\domains\%domainname%\%servername%目錄下,打開%servername%.log,查找,"A JDBC pool connection leak was detected",如果WebLogic已經監控到有連接池泄漏的話,就可以找到以下日志,并且很清楚的告訴我們在哪一個類的哪行代碼創建了連接,但沒有關閉(注意紅色加粗字體):


     

    2008-5-22 上午114720 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

     

    ……

          

     

           另外一種方法:

    WebLogic Console,展開 %DomainName% -> Servers -> %ServerName%,選到Logging – Server頁,在頁面最下方點擊 "View server log",同樣查找 "A JDBC pool connection leak was detected",也可以找到同樣的日志。

     

    WebLogic對于日志事件的說明:

     

    Message ID

    BEA-001074

    Subsystem

    JDBC

    Message

    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:

    Detail

    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. A

    stack trace is printed indicating where the leaked

    connection was created.

    Cause

    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. A

    stack trace is printed indicating where the leaked

    connection was created.

    Action

    Close the connection appropriately.



    原文:http://blog.csdn.net/esky2000/archive/2008/07/22/2689929.aspx
    posted on 2008-11-13 00:41 IT進行時 閱讀(1953) 評論(0)  編輯  收藏 所屬分類: Java Tips
    主站蜘蛛池模板: 亚洲色精品三区二区一区| 一区免费在线观看| 日韩a在线观看免费观看| 四虎影视久久久免费观看| 亚洲第一中文字幕| 亚洲午夜免费视频| a在线视频免费观看在线视频三区| 亚洲高清国产拍精品26U| 91成人免费在线视频| 农村寡妇一级毛片免费看视频| 亚洲人成在线影院| 国产免费av片在线播放| 亚洲AV成人一区二区三区在线看 | 国产在线a免费观看| 在线亚洲v日韩v| 亚洲精品韩国美女在线| 亚洲国产精品尤物yw在线 | 国产精品极品美女自在线观看免费| 亚洲精品国产成人专区| 亚洲 国产 图片| 一级做a爰片久久毛片免费陪 | 国产a视频精品免费观看| 一本到卡二卡三卡免费高| 亚洲av片不卡无码久久| 亚洲精品成人无限看| 永久免费无码网站在线观看| 6080午夜一级毛片免费看| 亚洲国产高清在线精品一区| 亚洲精品无码日韩国产不卡?V | 亚洲自偷精品视频自拍| 亚洲毛片av日韩av无码| 女性自慰aⅴ片高清免费| 免费无码成人AV在线播放不卡| 九九九精品视频免费| 亚洲aⅴ无码专区在线观看春色| 亚洲五月六月丁香激情| 亚洲日韩精品无码专区网址 | 日韩一区二区a片免费观看| 久久久久久久99精品免费观看| 亚洲最大黄色网站| 久久精品国产亚洲AV果冻传媒|