如何在linux命令行查看weblogic连接池连接数中jdbc的状态或连接数??

Linux下命令行安装weblogic10.3.6
一、安装weblogic10.3.6
-bash-4.1$ java -jar wls1036_generic.jar
Unable to instantiate GUI, defaulting to console mode.无法实例化 GUI,默认进入控制台模式。Extracting
0%....................................................................................................100%
&-------------------- Oracle Installer - WebLogic
10.3.6.0 -------------------&
This installer will guide you through the installation of
WebLogic 10.3.6.0.
Type "Next" or enter to proceed to the next
prompt.& If you want to change data entered
previously, type "Previous".& You may quit the
installer at any time by typing "Exit".
Enter [Exit][Next]& 回车
&-------------------- Oracle Installer - WebLogic
10.3.6.0 -------------------&
Choose Middleware Home Directory:
---------------------------------
"Middleware Home" = [Enter new value or use default
"/bea/weblogic/Oracle/Middleware"]
Enter new Middleware Home OR [Exit][Previous][Next]&
/bea/weblogic/
&-------------------- Oracle Installer - WebLogic
10.3.6.0 -------------------&
Choose Middleware Home Directory:
---------------------------------
"Middleware Home" = [/bea/weblogic]
Use above value or select another option:
&&& 1 - Enter
new Middleware Home
&&& 2 - Change
to default [/bea/weblogic/Oracle/Middleware]
Enter option number to select OR
[Exit][Previous][Next]& 1
&-------------------- Oracle Installer - WebLogic
10.3.6.0 -------------------&
Choose Middleware Home Directory:
---------------------------------
"Middleware Home" = [/bea/weblogic]
Enter new Middleware Home OR
[Exit][Previous][Next]&
&-------------------- Oracle Installer - WebLogic
10.3.6.0 -------------------&
Choose Middleware Home Directory:
---------------------------------
/bea/weblogic directory is not empty. Proceed with
installation?
Enter [Exit][Previous][Next]&
&-------------------- Oracle Installer - WebLogic
10.3.6.0 -------------------&
Register for Security Updates:
------------------------------
Provide your email address for security updates
and& to initiate configuration manager.
&& 1|Email:[]
&& 2|Support Password:[]
&& 3|Receive Security
Update:[Yes]
Enter index number to select OR
[Exit][Previous][Next]& 3
&-------------------- Oracle Installer - WebLogic
10.3.6.0 -------------------&
Register for Security Updates:
------------------------------
Provide your email address for security updates
and& to initiate configuration manager.
&&& "Receive
Security Update:" = [Enter new value or use default "Yes"]
Enter [Yes][No]? no
&-------------------- Oracle Installer - WebLogic
10.3.6.0 -------------------&
Register for Security Updates:
------------------------------
Provide your email address for security updates
and& to initiate configuration manager.
&&& "Receive
Security Update:" = [Enter new value or use default "Yes"]
Enter [Yes][No]? yes
&-------------------- Oracle Installer - WebLogic
10.3.6.0 -------------------&
Register for Security Updates:
------------------------------
Provide your email address for security updates
and& to initiate configuration manager.
&& 1|Email:[]
&& 2|Support Password:[]
&& 3|Receive Security
Update:[No]
Enter index number to select OR
[Exit][Previous][Next]&
&-------------------- Oracle Installer - WebLogic
10.3.6.0 -------------------&
Register for Security Updates:
------------------------------
Provide your email address for security updates
and& to initiate configuration manager.
&& 1|Email:[]
&& 2|Support Password:[]
&& 3|Receive Security
Update:[No]
Enter index number to select OR
[Exit][Previous][Next]&
&-------------------- Oracle Installer - WebLogic
10.3.6.0 -------------------&
Choose Install Type:
--------------------
Select the type of installation you wish to perform.
&-&1|Typical
|& Install the following product(s) and
component(s):
&&& | - WebLogic
&&& | - Oracle
&& 2|Custom
|& Choose software products and components to
install and perform optional
|configuration.
Enter index number to select OR
[Exit][Previous][Next]& 2
&-------------------- Oracle Installer - WebLogic
10.3.6.0 -------------------&
Choose Products and Components:
-------------------------------
&&& Release
|_____WebLogic Server [1] x
|&&& |_____Core
Application Server [1.1] x
|_____Administration Console [1.2] x
|_____Configuration Wizard and Upgrade Framework [1.3] x
|&&& |_____Web
2.0 HTTP Pub-Sub Server [1.4] x
|_____WebLogic SCA [1.5] x
|_____WebLogic JDBC Drivers [1.6] x
|&&& |_____Third
Party JDBC Drivers [1.7] x
|_____WebLogic Server Clients [1.8] x
|_____WebLogic Web Server Plugins [1.9] x
|&&& |_____UDDI
and Xquery Support [1.10] x
|_____Server Examples [1.11]
|_____Evaluation Database [1.12] x
&&& |_____Oracle
Coherence [2] x
|_____Coherence Product Files [2.1] x
|_____Coherence Examples [2.2]
*Estimated size of installation: 690.2 MB
Enter number exactly as it appears in brackets to toggle selection
OR [Exit][Previous][Next]& 2
&-------------------- Oracle Installer - WebLogic
10.3.6.0 -------------------&
Choose Products and Components:
-------------------------------
&&& Release
|_____WebLogic Server [1] x
|&&& |_____Core
Application Server [1.1] x
|_____Administration Console [1.2] x
|_____Configuration Wizard and Upgrade Framework [1.3] x
|&&& |_____Web
2.0 HTTP Pub-Sub Server [1.4] x
|_____WebLogic SCA [1.5] x
|_____WebLogic JDBC Drivers [1.6] x
|&&& |_____Third
Party JDBC Drivers [1.7] x
|_____WebLogic Server Clients [1.8] x
|_____WebLogic Web Server Plugins [1.9] x
|&&& |_____UDDI
and Xquery Support [1.10] x
|_____Server Examples [1.11]
|_____Evaluation Database [1.12] x
&&& |_____Oracle
Coherence [2]
|_____Coherence Product Files [2.1]
|_____Coherence Examples [2.2]
*Estimated size of installation: 678.7 MB
Enter number exactly as it appears in brackets to toggle selection
OR [Exit][Previous][Next]&
&-------------------- Oracle Installer - WebLogic
10.3.6.0 -------------------&
JDK Selection (Any * indicates Oracle Supplied VM):
---------------------------------------------------
JDK(s) chosen will be installed.& Defaults will
be used in script string-substitution if installed.
&& 1|Add Local Jdk
2|/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64[x]
&& *Estimated size of
installation:& 678.7 MB
Enter 1 to add or &= 2 to toggle
selection& OR
[Exit][Previous][Next]&
&-------------------- Oracle Installer - WebLogic
10.3.6.0 -------------------&
Choose Product Installation Directories:
----------------------------------------
Middleware Home Directory: [/bea/weblogic]
Product Installation Directories:
&&& "WebLogic
Server" = [Enter new value or use default
"/bea/weblogic/wlserver_10.3"]
Enter new WebLogic Server OR
[Exit][Previous][Next]&
&-------------------- Oracle Installer - WebLogic
10.3.6.0 -------------------&
The following Products and JDKs will be installed:
--------------------------------------------------
&&& WebLogic
Platform 10.3.6.0
|_____WebLogic Server
|_____Core Application Server
|_____Administration Console
|_____Configuration Wizard and Upgrade Framework
|_____Web 2.0 HTTP Pub-Sub Server
|_____WebLogic SCA
|_____WebLogic JDBC Drivers
|_____Third Party JDBC Drivers
|_____WebLogic Server Clients
|_____WebLogic Web Server Plugins
|_____UDDI and Xquery Support
|_____Evaluation Database
*Estimated size of installation: 678.8 MB
Enter [Exit][Previous][Next]&
&-------------------- Oracle Installer - WebLogic
10.3.6.0 -------------------&
Installing files..
0%&&&&&&&&&
25%&&&&&&&&&
50%&&&&&&&&&
75%&&&&&&&&&
[------------|------------|------------|------------]
[***************************************************]
Performing String Substitutions...
&-------------------- Oracle Installer - WebLogic
10.3.6.0 -------------------&
Configuring OCM...
0%&&&&&&&&&
25%&&&&&&&&&
50%&&&&&&&&&
75%&&&&&&&&&
[------------|------------|------------|------------]
[***************************************************]
Creating Domains...
&-------------------- Oracle Installer - WebLogic
10.3.6.0 -------------------&
Installation Complete
Congratulations! Installation is complete.
Press [Enter] to continue or type [Exit]&
&-------------------- Oracle Installer - WebLogic
10.3.6.0 -------------------&
Clean up process in progress ...
二、配置domains
-bash-4.1$ ./config.sh
./config.sh: line 103:
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/bin/java: No such
file or directory
-bash-4.1$ ./config.sh
Unable to instantiate GUI, defaulting to console mode.
&------------------- Fusion Middleware Configuration
Wizard ------------------&
Choose between creating and extending a domain. Based on your
selection,
the Configuration Wizard guides you through the steps to generate a
extend an existing domain.
&-&1|Create a new WebLogic
|&&& Create a
WebLogic domain in your projects directory.&
&& 2|Extend an existing
WebLogic domain
|&&& Use this
option to add new components to an existing domain and
modify&&&&
|configuration settings.
Enter index number to select OR [Exit][Next]& 1
&------------------- Fusion Middleware Configuration
Wizard ------------------&
Select Domain Source:
---------------------
Select the source from which the domain will be created. You can
create the
domain by selecting from the required components or by selecting
list of existing domain templates.
&-&1|Choose Weblogic Platform
components
|&&& You can
choose the Weblogic component(s) that you want supported in
&& 2|Choose custom
|&&& Choose this
option if you want to use an existing& template.
&&& |could be a
custom created template using the Template Builder.
Enter index number to select OR
[Exit][Previous][Next]& 1
&------------------- Fusion Middleware Configuration
Wizard ------------------&
Application Template Selection:
-------------------------------
&&& Available
&&& |_____Basic
WebLogic Server Domain - 10.3.6.0 [wlserver_10.3]x
&&& |_____Basic
WebLogic SIP Server Domain - 10.3.6.0 [wlserver_10.3] [2]
|_____WebLogic Advanced Web Services for JAX-RPC Extension -
10.3.6.0 [wlserver_10.3] [3]
|_____WebLogic Advanced Web Services for JAX-WS Extension -
10.3.6.0 [wlserver_10.3] [4]
Enter number exactly as it appears in brackets to toggle selection
OR [Exit][Previous][Next]&
&------------------- Fusion Middleware Configuration
Wizard ------------------&
Edit Domain Information:
------------------------
Value&&& |
_|________|_____________|
&& 1| *Name: | base_domain |
Enter value for "Name" OR [Exit][Previous][Next]&
&------------------- Fusion Middleware Configuration
Wizard ------------------&
Edit Domain Information:
------------------------
|& Name& |&
&& _|________|_________|
&& 1| *Name: | wlyxweb |
Use above value or select another option:
&&& 1 - Modify
&&& 2 - Discard
Enter option number to select OR
[Exit][Previous][Next]&
&------------------- Fusion Middleware Configuration
Wizard ------------------&
Select the target domain directory for this domain:
---------------------------------------------------
&&& "Target
Location" = [Enter new value or use default
"/bea/weblogic/user_projects/domains"]
Enter new Target Location OR
[Exit][Previous][Next]& /wlyx/webapp/domains
&------------------- Fusion Middleware Configuration
Wizard ------------------&
Configure Administrator User Name and Password:
-----------------------------------------------
Create a user to be assigned to the Administrator role. This
user is the
default administrator used to start development mode servers.
|&&&&&&&&&
Name&&&&&&&&&&
|&&&&&&&&&&&&&&&&&
Value&&&&&&&&&&&&&&&&&
_|_________________________|_________________________________________|
1|&&&&&&&&
*Name:&&&&&&&&&
|&&&&&&&&&&&&&&&
weblogic&&&&&&&&&&&&&&&&
password:&&&&
|&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&& 3| *Confirm user password:
|&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Description:&&&&&&
| This user is the default administrator. |
Use above value or select another option:
&&& 1 - Modify
&&& 2 - Modify
"User password"
&&& 3 - Modify
"Confirm user password"
&&& 4 - Modify
"Description"
Enter option number to select OR
[Exit][Previous][Next]& 2
&------------------- Fusion Middleware Configuration
Wizard ------------------&
Configure Administrator User Name and Password:
-----------------------------------------------
Create a user to be assigned to the Administrator role. This
user is the
default administrator used to start development mode servers.
&&& "*User
password:" = []
Enter new *User password: OR [Exit][Reset][Accept]&
&------------------- Fusion Middleware Configuration
Wizard ------------------&
Configure Administrator User Name and Password:
-----------------------------------------------
Create a user to be assigned to the Administrator role. This
user is the
default administrator used to start development mode servers.
|&&&&&&&&&
Name&&&&&&&&&&
|&&&&&&&&&&&&&&&&&
Value&&&&&&&&&&&&&&&&&
_|_________________________|_________________________________________|
1|&&&&&&&&
*Name:&&&&&&&&&
|&&&&&&&&&&&&&&&
weblogic&&&&&&&&&&&&&&&&
password:&&&&
|&&&&&&&&&&&&&&&
*********&&&&&&&&&&&&&&&
&& 3| *Confirm user password:
|&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Description:&&&&&&
| This user is the default administrator. |
Use above value or select another option:
&&& 1 - Modify
&&& 2 - Modify
"User password"
&&& 3 - Modify
"Confirm user password"
&&& 4 - Modify
"Description"
&&& 5 - Discard
Enter option number to select OR
[Exit][Previous][Next]& 3
&------------------- Fusion Middleware Configuration
Wizard ------------------&
Configure Administrator User Name and Password:
-----------------------------------------------
Create a user to be assigned to the Administrator role. This
user is the
default administrator used to start development mode servers.
&&& "*Confirm
user password:" = []
Enter new *Confirm user password: OR
[Exit][Reset][Accept]& welwlyx50
&------------------- Fusion Middleware Configuration
Wizard ------------------&
Configure Administrator User Name and Password:
-----------------------------------------------
Create a user to be assigned to the Administrator role. This
user is the
default administrator used to start development mode servers.
|&&&&&&&&&
Name&&&&&&&&&&
|&&&&&&&&&&&&&&&&&
Value&&&&&&&&&&&&&&&&&
_|_________________________|_________________________________________|
1|&&&&&&&&
*Name:&&&&&&&&&
|&&&&&&&&&&&&&&&
weblogic&&&&&&&&&&&&&&&&
password:&&&&
|&&&&&&&&&&&&&&&
*********&&&&&&&&&&&&&&&
&& 3| *Confirm user password:
|&&&&&&&&&&&&&&&
*********&&&&&&&&&&&&&&&
Description:&&&&&&
| This user is the default administrator. |
Use above value or select another option:
&&& 1 - Modify
&&& 2 - Modify
"User password"
&&& 3 - Modify
"Confirm user password"
&&& 4 - Modify
"Description"
&&& 5 - Discard
Enter option number to select OR
[Exit][Previous][Next]&
&------------------- Fusion Middleware Configuration
Wizard ------------------&
Domain Mode Configuration:
--------------------------
Enable Development or Production Mode for this domain.
&-&1|Development Mode
&& 2|Production Mode
Enter index number to select OR
[Exit][Previous][Next]& 2
&------------------- Fusion Middleware Configuration
Wizard ------------------&
Java SDK Selection:
-------------------
&-&1|N/A SDK 1.6.0_24 @
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64
&& 2|Other Java SDK
Enter index number to select OR
[Exit][Previous][Next]& 2
&------------------- Fusion Middleware Configuration
Wizard ------------------&
Java SDK Selection:
-------------------
Directory" = []
Enter new JVM Directory OR [Exit][Previous][Next]&
/bea/jdk/jdk1.6.0_37
&------------------- Fusion Middleware Configuration
Wizard ------------------&
Java SDK Selection:
-------------------
Directory" = [/bea/jdk/jdk1.6.0_37]
Enter new JVM Directory OR
[Exit][Previous][Next]&
&------------------- Fusion Middleware Configuration
Wizard ------------------&
Select Optional Configuration:
------------------------------
&& 1|Administration Server [
&& 2|Managed Servers, Clusters
and Machines [ ]
&& 3|RDBMS Security Store [ ]
Enter index number to select OR
[Exit][Previous][Next]& 1
&------------------- Fusion Middleware Configuration
Wizard ------------------&
Select Optional Configuration:
------------------------------
&& 1|Administration Server
&& 2|Managed Servers, Clusters
and Machines [ ]
&& 3|RDBMS Security Store [ ]
Enter index number to select OR
[Exit][Previous][Next]&
&------------------- Fusion Middleware Configuration
Wizard ------------------&
Configure the Administration Server:
------------------------------------
Each WebLogic Server domain must have one Administration Server.
Administration Server is used to perform administrative tasks.
Name&&&&&&
Value&&&&&&&
_|__________________|_____________________|
*Name:&&&&&
AdminServer&&&&
&& 2| *Listen address: | All
Local Addresses |
3|&& Listen
7001&&&&&&&&
&& 4| SSL listen port:
N/A&&&&&&&&
enabled:&&
false&&&&&&&
Use above value or select another option:
&&& 1 - Modify
&&& 2 - Modify
"Listen address"
&&& 3 - Modify
"Listen port"
&&& 4 - Modify
"SSL enabled"
Enter option number to select OR
[Exit][Previous][Next]&
&------------------- Fusion Middleware Configuration
Wizard ------------------&
Creating Domain...
0%&&&&&&&&&
25%&&&&&&&&&
50%&&&&&&&&&
75%&&&&&&&&&
[------------|------------|------------|------------]
[***************************************************]
**** Domain Created Successfully! ****
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。WebLogic的日常操作和监控_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
评价文档:
WebLogic的日常操作和监控
上传于||暂无简介
大小:1.20MB
登录百度文库,专享文档复制特权,财富值每天免费拿!
你可能喜欢二次元同好交流新大陆
扫码下载App
汇聚2000万达人的兴趣社区下载即送20张免费照片冲印
扫码下载App
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!&&|&&
以无法为有法,以无限为有限!
LOFTER精选
网易考拉推荐
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
阅读(1518)|
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
历史上的今天
在LOFTER的更多文章
loftPermalink:'',
id:'fks_',
blogTitle:'weblogic配置JDBC数据源详解',
blogAbstract:''
{list a as x}
{if x.moveFrom=='wap'}
{elseif x.moveFrom=='iphone'}
{elseif x.moveFrom=='android'}
{elseif x.moveFrom=='mobile'}
${a.selfIntro|escape}{if great260}${suplement}{/if}
{list a as x}
推荐过这篇日志的人:
{list a as x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
转载记录:
{list d as x}
{list a as x}
{list a as x}
{list a as x}
{list a as x}
{if x_index>4}{break}{/if}
${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{list a as x}
{if !!(blogDetail.preBlogPermalink)}
{if !!(blogDetail.nextBlogPermalink)}
{list a as x}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
{list a as x}
{var first_option =}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if}&&“${b[voteToOption_index]}”&&
{if (x.role!="-1") },“我是${c[x.role]}”&&{/if}
&&&&&&&&${fn1(x.voteTime)}
{if x.userName==''}{/if}
网易公司版权所有&&
{list x.l as y}
{if defined('wl')}
{list wl as x}{/list}Weblogic常见故障一:JDBC Connection Pools . - xuzhengzhu - 博客园
把握现在,领导未来
posts - 570, comments - 20, trackbacks - 18, articles - 0
WebLogic Server中数据库连接池是一个经常出问题的地方,总结一下出问题的原因和解决办法。一、数据库连接泄漏此类问题一般都是由于开发人员没有正确关闭数据库连接造成的。比如使用完Connection后,没有调用Connection.close()方法。1、诊断方法在Console中,找到Connection Pools Tab 和Diagnostics,设置以下属性(不同版本可能略有区别)Enable Connection Leak Profiling 启用连接池泄漏的监控。Enable Connection Profiling 启用连接池监控。Inactive Connection Timeout 100 表示100秒后强制回收无效连接。默认0,表示使用完才释放回连接池。无需重启,查看server的log,查找&A JDBC pool connection leak was detected&,如果有,看看是哪个类引起的。下面是一个数据库连接泄漏的例子: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.JTAConnection.init(JTAConnection.java:90)at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:468)at weblogic.jdbc.jta.DataSource.connect(DataSource.java:410)at mon.internal.RmiDataSource.getConnection(RmiDataSource.java:344)at troubleshooting.servlets.JdbcConnections.service(JdbcConnections.java:97)at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1077)at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:7047)at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3902)at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2773)at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)问题解决后,把三个属性设置回先前的值。2、解决方法正确的关闭数据库连接。具体代码如下:Connection conn =ResultSet rs =preparedStatement pss =try {conn = dataSource.getConnection(USERID,pASSWORD);pss = conn.prepareStatement("SELECT SAVESERIALZEDDATA FROM SESSION.pINGSESSION3DATA WHERE&SESSIONKEY = ?");pss.setString(1,sessionKey);rs = pss.executeQuery();pss.close();}catch (Throwable t) {}&finally {try&{if (conn != null) conn.close();}&catch (Exception e){}}
二、数据库连接不够用
导致数据库连接不够用的原因主要有:①某些程序占用connection时间过长,如果多个用户同时使用这些程序,则会导致连接不够用。②线程死锁,无法释放connection。1、诊断方法①监控参数:Waiting For Connection High Count[domain_name]-& Enviroment -& Servers -& [Server] -& Monitoring -& JDBC查看参数:Waiting For&Connection High Count如果没有此参数,手工添加进来,该参数表示在没有可用连接的情况下,应用程序等待连接的最大个数。调整后的连接池最大值 = 调整前的连接池最大值 + Waiting For Connection High Count。一般来说,数据库连接池的大小与最佳并发用户数相当。②在Server Log中,明确抛出下列异常:java.sql.SQLException: Internal error: Cannot obtain XAConnection&mon.resourcepool.ResourceLimitException: No resources currently available in pool&BankConnectionPool to allocate to applications, please increase the size of the pool and retry..at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1493)at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:455)at weblogic.jdbc.jta.DataSource.connect(DataSource.java:410)at mon.internal.RmiDataSource.getConnection(RmiDataSource.java:344)at troubleshooting.servlets.JdbcConnections.service(JdbcConnections.java:80)at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1077)at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:7047)at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3902)at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2773)at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)如果此时观察connection的监控,会发现所有connection 都是Active,而且还有大量请求等待connection。2、解决方法①提高Maximum Capacity数量,该值一般略大于峰值情况下的数据库连接数。Services & JDBC & Connection Pools & BankConnectionPool & Configuration & Connections②重点检查synchronize代码段和涉及数据库锁的代码。如果有必要,可以查看thread dump,看看线程在忙什么和等什么。三、数据库连接使用超时此类问题一般是由于某些数据库操作时间比较长,超过了Inactive connection timeout的设置。1、诊断方法在Server Log中,明确有下列提示,并且在提示后抛出应用异常:Forcibly releasing inactive resource "mon.internal.ConnectionEnv@132967d" back&into the pool BankConnectionPool".这里无法列出应用异常,因为每个应用都不一样,不过很有可能会抛出空指针异常,因为Connection被强制放回池中了,继续使用一个空对象会抛出该异常。2、解决方法在高级参数中,提高Inactive connection timeout数量。Services & JDBC & Connection Pools & BankConnectionPool & Configuration & Connections四、事务超时此类问题一般是由于某些数据库操作时间比较长,超过了JTA Timeout Seconds的设置。1、诊断方法在Server Log中,明确抛出异常:weblogic.transaction.internal.TimedOutException: Transaction timed out after 300 seconds2、解决方法提高Services & JTA Configuration & Timeout Seconds数量。注意这个参数应该小于Inactive connection timeout的值,因为事务必须在连接超时前完成。如果想分析究竟是哪些SQL语句导致事务超时,可以打开日志AdminServer & Logging & JDBC,选中Enable JDBC Logging,并设置JDBC Log File Name。

我要回帖

更多关于 weblogic连接数 的文章

 

随机推荐