Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Weblogic 8.1 JDBC connection pool spend 15 seconds to create a single connection

 
Ken Liao
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
we set up the JDBC Connection pool as below:

<JDBCConnectionPool
Name="ejb-pool"
CapacityIncrement="2"
DriverName="oracle.jdbc.driver.OracleDriver"
InitialCapacity="30"
MaxCapacity="100"
Properties="user=xxxx;password=xxxxx"
ShrinkingEnabled="true"
URL="jdbcracle:thin:@//xxxxxx1521/xxxxx"
TestTableName="SQL select 1 from /*wl:jdbc:ejb-pool*/dual"
TestConnectionsOnReserve="true"
ConnLeakProfilingEnabled="false"
StatementCacheSize="10"
Targets="myservers
/>


It takes 15 seconds create each single connection, E.g, by settings, it should init 30 connections when starting up weblogic; and it the log file, we noticed that it takes 15s to create each one:



####<Aug 17, 2014 4:59:26 AM GMT> <Info> <JDBC> <eng-xps5> <ncs0> <main> <<WLS Kernel>> <> <BEA-001068> <Connection for pool "ejb-pool" created.>
####<Aug 17, 2014 4:59:26 AM GMT> <Info> <JDBC> <eng-xps5> <ncs0> <main> <<WLS Kernel>> <> <BEA-001132> <Initialized statement cache of size "10" for connection in pool "ejb-pool".>
####<Aug 17, 2014 4:59:41 AM GMT> <Info> <JDBC> <eng-xps5> <ncs0> <main> <<WLS Kernel>> <> <BEA-001068> <Connection for pool "ejb-pool" created.>
####<Aug 17, 2014 4:59:41 AM GMT> <Info> <JDBC> <eng-xps5> <ncs0> <main> <<WLS Kernel>> <> <BEA-001132> <Initialized statement cache of size "10" for connection in pool "ejb-pool".>
####<Aug 17, 2014 4:59:57 AM GMT> <Info> <JDBC> <eng-xps5> <ncs0> <main> <<WLS Kernel>> <> <BEA-001068> <Connection for pool "ejb-pool" created.>
####<Aug 17, 2014 4:59:57 AM GMT> <Info> <JDBC> <eng-xps5> <ncs0> <main> <<WLS Kernel>> <> <BEA-001132> <Initialized statement cache of size "10" for connection in pool "ejb-pool".>




I'm wondering is there any attribute which may cause this issue in weblogic settings?


Basically this issue only happens on our production environment which is using Oracle ODA (Oracle Database Appliance‎) database;

This setting works fine for our testing and developing environment which is a normal Oracle DB;

We thought it might be the ODA settings; but we have another application which is running with Jetty Apache Datasource:


<New class="org.apache.commons.dbcp.BasicDataSource">
<Set name="driverClassName">oracle.jdbc.driver.OracleDriver</Set>

<Set name="url">jdbcracle:thin:@xxxxxx1521:xxxxx</Set>
<Set name="username">xxxx</Set>
<Set name="password">xxxx</Set>

<Set name="initialSize">10</Set>
<Set name="maxActive">100</Set>
<Set name="maxIdle">50</Set>
<Set name="minIdle">10</Set>
</New>


And this one is working fine, that means this is not the ODA issue;

So I'm wondering is there any settings in weblogic which may cause this issue?







 
Erik Brandsberg
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just a guess, but I would check for DNS resolution issues.
 
Ken Liao
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Erik Brandsberg wrote:Just a guess, but I would check for DNS resolution issues.


Yeah, actually we found out that it could be DNS issue; our production is using ODA (Oracle Database Appliance‎) box which have two DB nodes (oda1, oda2) clustered;

and then there are two oda-scanners which is working as load balancer in front of the ODA listner; we defined one domain name as "oda-scan" for these two scanner:

Name: oda-scan
Address: xx.xx.xx.35
Name: oda-scan
Address: xx.xx.xx.34


The JDBC URL in weblogic is: jdbcracle:thin:@(description=(address=(host=oda-scan)(protocol=tcp)(port=1521))(connect_data=(service_name=xxx)))

The it takes 15s to create new connection, we checked that DNS works fine in weblogic server,

But if we change the URL as: jdbcracle:thin:@(description=(address_list=(address=(host=xx.xx.xx.35)(protocol=tcp)(port=1521))(address=(host=xx.xx.xx.34)(protocol=tcp)(port=1521))(load_balance=yes)(failover=yes)) (connect_data=(service_name=xxx)))'; and it works fine;

we have no idea why is this, but after we tried to restart the oda-scanner; and it just works; it could be ODA-SCANNER has something wired settings;




 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic