第 1 页 共 6 页 W AS 连接池满的问题跟踪技巧 编制日期:2 0 1 2 -0 3 -1 0 W AS 连接池满的问题跟踪技巧 第 2 页 共 6 页 目录 W AS 连接池满的问题跟踪技巧 ............................................................................................. 1 1 概述 ................................................................................................................................... 3 2 打开连接池跟踪选项 ....................................................................................................... 3 2.1 WAS V5.1 .................................................................................................................... 3 2.2 V7, V6.1 and V6.0 ....................................................................................................... 4 3 分析 trace 输出 ................................................................................................................ 5 WAS 连接池满的问题跟踪技巧 第 3 页 共 6 页 1 概述 尝试通过如下方法来跟踪jdbc 连接池满的问题: 1、在经常出现问题无法解决的情况下,通过下面描述的方法打开 trace 选项; 2、出现故障时,将 trace 文件拷贝到别的机器,避免被冲掉。 3、用下文描述的trace 工具对 trace 文件进行分析,看能否找到是什么代码导致连接被长时间调用或者没被释放。 注意事项: 1、根据下文提示,设置足够大的trace 文件配额,并保证磁盘空间需要足够。 2、无故障时,应尽量关闭 trace,对性能有一定程度的影响。 3、打开 trace 开关后,应观察是否确实产生了 trace 日志。 2 打开连接池跟踪选项 2.1 W AS V5.1 In the Application Server Administrative Console, expand Troubleshooting and select Logs and Trace. a. In the Logging and Tracing page, select your server and then Diagnostic Trace. It is recommended to set the number of historical trace files to 10 and the size of each historical trace file to 100MB. b. Ensure that enable trace w ith the follow ing specification is selected. ...