Forcibly releasing inactive connection  BEA-001153

Hello there!, here at work we use Jdeveloper 11.1.3.0 , with JNDI Data Sources to access database (configured from WLS) My DataSource config is:
<?xml version='1.0' encoding='UTF-8'?>
<jdbc-data-source xmlns="http://xmlns.oracle.com/weblogic/jdbc-data-source" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/jdbc-data-source http://xmlns.oracle.com/weblogic/jdbc-data-source/1.0/jdbc-data-source.xsd">
  <name>arq</name>
  <jdbc-driver-params>
    <url>jdbc:oracle:thin:@192.168.101.**:1521/HLSEDB</url>
    <driver-name>oracle.jdbc.OracleDriver</driver-name>
    <properties>
      <property>
        <name>user</name>
        <value>dbadmin</value>
      </property>
    </properties>
    <password-encrypted>{AES}6mOLLY92ueqAFcFK3k29k/SUeCy/qgp1a9HGsHsCTg4=</password-encrypted>
  </jdbc-driver-params>
  <jdbc-connection-pool-params>
    <initial-capacity>1</initial-capacity>
    <max-capacity>15</max-capacity>
    <capacity-increment>1</capacity-increment>
    <shrink-frequency-seconds>900</shrink-frequency-seconds>
    <highest-num-waiters>2147483647</highest-num-waiters>
    <connection-creation-retry-frequency-seconds>0</connection-creation-retry-frequency-seconds>
    <connection-reserve-timeout-seconds>10</connection-reserve-timeout-seconds>
    <test-frequency-seconds>120</test-frequency-seconds>
    <test-connections-on-reserve>false</test-connections-on-reserve>
    <ignore-in-use-connections-enabled>true</ignore-in-use-connections-enabled>
    <inactive-connection-timeout-seconds>360</inactive-connection-timeout-seconds>
    <test-table-name>SQL SELECT 1 FROM DUAL</test-table-name>
    <login-delay-seconds>0</login-delay-seconds>
    <statement-cache-size>10</statement-cache-size>
    <statement-cache-type>LRU</statement-cache-type>
    <remove-infected-connections>true</remove-infected-connections>
    <seconds-to-trust-an-idle-pool-connection>10</seconds-to-trust-an-idle-pool-connection>
    <statement-timeout>-1</statement-timeout>
    <pinned-to-thread>false</pinned-to-thread>
  </jdbc-connection-pool-params>
  <jdbc-data-source-params>
    <jndi-name>jdbc/arq</jndi-name>
    <global-transactions-protocol>OnePhaseCommit</global-transactions-protocol>
  </jdbc-data-source-params>
</jdbc-data-source>Minutes after deploying mi application, console starts to show :
<JDBC> <BEA-001153> <Forcibly releasing inactive connection "weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_T4CConnection@22e" back into the connection pool "SegDS", currently reserved by: java.lang.Exception
     at weblogic.jdbc.common.internal.ConnectionEnv.setup(ConnectionEnv.java:318)
     at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:344)
     at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:322)
     at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:438)
     at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:317)
     at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(ConnectionPoolManager.java:93)
     at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(ConnectionPoolManager.java:106)
     at weblogic.jdbc.pool.Driver.connect(Driver.java:149)There's any best practice or guide to configure my Datasource? or we should avoid JNDI's and start to use only appmodule connection?
Thanks !

I found the answer for this issue, because "Inactive timeout connection" of "advanced" in "data sources" of welogic admin console set to 300 seconds, once we changed to "zero". This msg is gone.

Similar Messages

  • Inactive connections in database

    Hi,
    I'm using Oracle 10 with my Weblogic 8.1. I'm having cluster environment with 3 managed servers. Each is having initial capacity of 30 connections in connection pool. Now when I see my oracle database, its showing 90 INACTIVE connections. What does that mean? Is it related to Weblogic? If yes, how?

    Hello.
    Well, connection pool are well describe at some good places, I will try. The WLS admin setup a connection pool which consist in a number of connection on a database with the same loginname/password.
    Those connections are opened on WLS startup and are ready for application use. When an application needs a connection, it asks for one, and WLS gives a already opened one. Doing so, you don't have to connect to the database each time, as the connection already exists.
    When the application is done with the connection, it releases it and this connections returns in pool.
    Rgds.

  • Release jms connection doesn?t release.

              Hi All,
              Environment: WLS 7.0sp2, JMS: weblogic JMS JMSJDBCStore, database oracle9
              We invoke the following sendEvent code from a worker thread invoked by a scheduler
              that was started in a servlet init method (this worker thread code is wrapped
              with a user tx).
              The topic’s MDB is getting the message OK, however the number of connection in
              the monitor (mydomain> JMS Servers> NomJMSServer> Active JMS Servers) keep growing.
              As you can see we are releasing the connection in a finally block. Can anybody
              explain it.?
              Second question: Should we cache the jms session? If the answer is yes, can they
              expire (close), how do we check if they are still valid?
              Thanks
              public String sendEvent(SyncOutput event)
              String retval = null;
              try
              init();
              topicPublisher.publish( formatMessage(event) );
              catch (Exception e)
              logger().debug("cannot send event", e);
              }finally{
              release();
              return retval;
              private Message formatMessage(SyncOutput output)
              throws JMSException, IOException
              BytesMessage message = topicSession.createBytesMessage();
              GZIPOutputStream gzip = new GZIPOutputStream(new BytesMessageOutputStream(message));
              output.flush(new OutputStreamWriter(gzip));
              gzip.close();
              return message;
              private void init()
              throws Exception
              InitialContext context = new InitialContext();
              TopicConnectionFactory conFactory =
              (TopicConnectionFactory) context.lookup(JMSConfig.get(JMSConfig.FACTORY));
              topicConnection = conFactory.createTopicConnection();
              topicSession = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
              Topic topic = (Topic) context.lookup( this.jndiName );
              topicPublisher = topicSession.createPublisher(topic);
              topicPublisher.setDeliveryMode(     DeliveryMode.PERSISTENT );
              private void release()
              try{
              if (topicPublisher != null){
              topicPublisher.close();
              topicPublisher = null;
              if (topicSession != null){
              topicSession.close();
              topicSession = null;
              if (topicConnection != null) {
              topicConnection.close();
              topicConnection = null;
              System.gc();
              }catch(Exception ignore){
              ignore.printStackTrace();
              

              We found the problem, it was a bug in our code. Thanks for your help.
              Tom Barnes <[email protected]> wrote:
              >Its possible the monitor has a bug, but in your case, since
              >you now only create one connection how could the
              >connection count keep growing?
              >
              >Perhaps the MDB app or MDB container is failing in some
              >unexpected way and not
              >closing its connection before attempting to create a new one?
              >Check your log for warnings and error messages, and
              >consider encapsulating your onMessage() code with a
              >try { /* all onMessage code */ }
              >catch (Throwable t) { t.printStackTrace(); rethrow}
              >
              >Meir wrote:
              >> Is it possible that the monitor has a bug? I changed my code to cache
              >the topic
              >> session and topic publisher, so I always use the same one (they are
              >static members
              >> of the class) but this didn't change the result that I'm seeing in
              >the monitor
              >> - the number of connections still keep growing.
              >> Could it be TX related weirdness (note we set the factory "User Transactions
              >Enabled"
              >> attribute to true)?
              >>
              >>
              >> "Meir" <[email protected]> wrote:
              >>
              >>>Thanks for your quick response.
              >>>I cahnged the code to catch throwable (both the open and close connection
              >>>are
              >>>in the try/catch block) and I don't see any problems.
              >>>Do you have any other suggestions? Do you need more data?
              >>>
              >>>
              >>>Tom Barnes <[email protected]> wrote:
              >>>
              >>>>
              >>>>Meir wrote:
              >>>>
              >>>>
              >>>>>Hi All,
              >>>>>
              >>>>>Environment: WLS 7.0sp2, JMS: weblogic JMS JMSJDBCStore, database
              >>>>
              >>>>oracle9
              >>>>
              >>>>>We invoke the following sendEvent code from a worker thread invoked
              >>>>
              >>>>by a scheduler
              >>>>
              >>>>>that was started in a servlet init method (this worker thread code
              >>>>
              >>>>is wrapped
              >>>>
              >>>>>with a user tx).
              >>>>>The topic’s MDB is getting the message OK, however the number of
              >connection
              >>>>
              >>>>in
              >>>>
              >>>>>the monitor (mydomain> JMS Servers> NomJMSServer> Active JMS Servers)
              >>>>
              >>>>keep growing.
              >>>>
              >>>>>As you can see we are releasing the connection in a finally block.
              >>>>
              >>>>Can anybody
              >>>>
              >>>>>explain it.?
              >>>>
              >>>>Perhaps you are throwing a RuntimeException or Error without
              >>>>catching it. Put trace statements before the connection
              >>>>create and right before and after the "connection.close()" to
              >>>>verify.
              >>>>
              >>>>Note that since you are closing the connection, there is no need
              >>>>to close the publisher or session.
              >>>>
              >>>>
              >>>>>Second question: Should we cache the jms session?
              >>>>
              >>>>For performance reasons, yes. But if your performance
              >>>>is fine, you don't need to. Since you are doing
              >>>>a "zip" per message, which is expensive in terms of CPU,
              >>>>the overhead of creating a session per
              >>>>message may be negligable in comparison.
              >>>>
              >>>>
              >>>>>If the answer is yes, can they
              >>>>>expire (close),
              >>>>
              >>>>If the host JMS server is adminstratively shutdown
              >>>>or the host JVM for the JMS server crashes...
              >>>>
              >>>>
              >>>>>how do we check if they are still valid?
              >>>>
              >>>>If it fails when you use it, it ain't valid. ;-)
              >>>>
              >>>>You can detect failures pro-actively by registering
              >>>>a connection onException listerner
              >>>>and a session onException listener.
              >>>>
              >>>>Note that WL 8.1 has built in connection/session
              >>>>pooling, and the JMS Performance Guide white-paper's
              >>>>appendix has sample code for writing your own pool for
              >>>>previous WL versions. There is a linke to
              >>>>the white-paper here:
              >>>>
              >>>>http://dev2dev.bea.com/technologies/jms/index.jsp
              >>>>
              >>>>
              >>>>>Thanks
              >>>>>
              >>>>>
              >>>>> public String sendEvent(SyncOutput event)
              >>>>> {
              >>>>> String retval = null;
              >>>>> try
              >>>>> {
              >>>>> init();
              >>>>> topicPublisher.publish( formatMessage(event) );
              >>>>> }
              >>>>> catch (Exception e)
              >>>>> {
              >>>>> logger().debug("cannot send event", e);
              >>>>> }finally{
              >>>>> release();
              >>>>> }
              >>>>> return retval;
              >>>>> }
              >>>>>
              >>>>> private Message formatMessage(SyncOutput output)
              >>>>> throws JMSException, IOException
              >>>>> {
              >>>>> BytesMessage message = topicSession.createBytesMessage();
              >>>>> GZIPOutputStream gzip = new GZIPOutputStream(new BytesMessageOutputStream(message));
              >>>>> output.flush(new OutputStreamWriter(gzip));
              >>>>> gzip.close();
              >>>>> return message;
              >>>>> }
              >>>>>
              >>>>> private void init()
              >>>>> throws Exception
              >>>>> {
              >>>>> InitialContext context = new InitialContext();
              >>>>> TopicConnectionFactory conFactory =
              >>>>> (TopicConnectionFactory) context.lookup(JMSConfig.get(JMSConfig.FACTORY));
              >>>>> topicConnection = conFactory.createTopicConnection();
              >>>>> topicSession = topicConnection.createTopicSession(false,
              >Session.AUTO_ACKNOWLEDGE);
              >>>>>
              >>>>> Topic topic = (Topic) context.lookup( this.jndiName );
              >>>>> topicPublisher = topicSession.createPublisher(topic);
              >>>>> topicPublisher.setDeliveryMode(     DeliveryMode.PERSISTENT );
              >>>>> }
              >>>>>
              >>>>> private void release()
              >>>>> {
              >>>>> try{
              >>>>> if (topicPublisher != null){
              >>>>> topicPublisher.close();
              >>>>> topicPublisher = null;
              >>>>> }
              >>>>>
              >>>>> if (topicSession != null){
              >>>>> topicSession.close();
              >>>>> topicSession = null;
              >>>>> }
              >>>>>
              >>>>> if (topicConnection != null) {
              >>>>> topicConnection.close();
              >>>>> topicConnection = null;
              >>>>> }
              >>>>>
              >>>>> System.gc();
              >>>>> }catch(Exception ignore){
              >>>>> ignore.printStackTrace();
              >>>>> }
              >>>>> }
              >>>>>
              >>>>
              >>
              >
              

  • How does inactive connection timeout attribute in weblogic works ?

    Lets say If there is a connection leakage in my application running on weblogic server 10.3.4 and I want to regain the unclosed connection.
    After going through some documentation I found out that setting inactive connection timeout to a positive value can fix this issue.
    With setting the above attribute will the weblogic server close any connection object which is inactive for specified number of seconds or it acts on only
    those connection objects which has lost all the references to it ?
    demonstrating the query by an example ,
    Lets say I have two connection objects con1 & con2 taken from a defined datasource in the weblogic.
    the inactive timeout has been set to 10 seconds.
    In a given thread lets say con1 does some db operation and then after being done, con2 is used for another db operation for greater than 10 seconds.
    Will the object con1 be still available for db operation or we need to take a fresh connection from the pool ?
    Thanks,
    Tarique
    Edited by: user779368 on 30-May-2011 06:29

    Any connection that has been reserved by an application, and not used for longer than
    the inactive timeout limit, will be taken back by the pool. All it's sub-objects will be closed etc.
    In your case, you would lose con1 while con2 was being used. Ideally, you would get
    any/either of those connections at the instant you really need it. Then, ideally use it
    till you can close it. But if you are doing transactions or a job that need connections,
    but can't avoid having them idle for X seconds, then set your inactive timeout larger than X.

  • How to immediately released database connection in jclient form app ?

    Hello Steve,
    We want our jclient form application could immediately released database connection when its be closed,
    We had follow your Weblog technical paper about http://radio.weblogs.com/0118231/stories/2005/02/10/amPoolingConsiderationsForAdfJclient.html , it mentioned following step to release Jclient database connection, but in our jclient project when we close separate jclient form application the database connection seems not immediately released(we monitor through TOAD trace session), the database connection will continue stay alive until we close the all project application.
    •Call panelBinding.releaseDataControl() method before our form application closed,
    •Set the AM pool's minimum available size to 0 (zero), and set the idle time and pool monitor interval shorter if the up-to 20-minute wait (in case it takes two wakeup cycles for the AM instance to be idle more than its idle time) is not something you like, or
    •Disable AM pooling altogether (jbo.ampooling.doampooling=false)In our project application the database connection behavior like following:
    1.when we open every Jclient form application , it will establish a new database connection for every form application
    2.But when we closed the jclient form application , the database connection still exist
    3.But when we open the same jclient form application again, the database connection will not create new database connection , it seems using the same connection when this application first create.
    4.when we close the all project application , it will release all database connection.
    Could you help us, thanks.
    Sincerely from, TIng-Rung

    Hello Steve,
    We have been study the paper that you mentioned, sorry that we still got some confused about AM pool and jdbc pool, My project bc4j,xcfg like following , could you help us what we missing ?
    ==============================
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <BC4JConfig>
    <AppModuleConfigBag>
    <AppModuleConfig name="xxxAppModuleLocal">
    <jbo.ampool.maxinactiveage>5000</jbo.ampool.maxinactiveage>
    <user>xxx</user>
    <jbo.project>His</jbo.project>
    <AppModuleJndiName>com.xxx.business.module.xxxAppModule</AppModuleJndiName>
    <DeployPlatform>LOCAL</DeployPlatform>
    <jbo.poolmonitorsleepinterval>10000</jbo.poolmonitorsleepinterval>
    <jbo.poolmaxinactiveage>5000</jbo.poolmaxinactiveage>
    <JDBCName>NEWNTUHRIS</JDBCName>
    <RELEASE_MODE>Stateless</RELEASE_MODE>
    <jbo.recyclethreshold>0</jbo.recyclethreshold>
    <ApplicationName>com.xxx.business.module.xxxAppModule</ApplicationName>
    <java.naming.factory.initial>oracle.jbo.common.JboInitialContextFactory</java.naming.factory.initial>
    <password>xxxx</password>
    <jbo.poolminavailablesize>0</jbo.poolminavailablesize>
    <DBconnection>jdbc:oracle:thin:@10.0.0.8:1521:xxx</DBconnection>
    <jbo.ampool.minavailablesize>0</jbo.ampool.minavailablesize>
    <jbo.ampool.monitorsleepinterval>10000</jbo.ampool.monitorsleepinterval>
    </AppModuleConfig>
    </AppModuleConfigBag>
    <ConnectionDefinition name="xxx">
    <ENTRY name="JDBC_PORT" value="1521"/>
    <ENTRY name="ConnectionType" value="JDBC"/>
    <ENTRY name="HOSTNAME" value="xx.xx.xx.xx"/>
    <ENTRY name="DeployPassword" value="true"/>
    <ENTRY name="user" value="xxx"/>
    <ENTRY name="ConnectionName" value="xxx"/>
    <ENTRY name="SID" value="xxx"/>
    <ENTRY name="password">
    <![CDATA[{904}0505E5FED797881374FDE8BD1606B6CF01]]>
    </ENTRY>
    <ENTRY name="JdbcDriver" value="oracle.jdbc.driver.OracleDriver"/>
    <ENTRY name="ORACLE_JDBC_TYPE" value="thin"/>
    <ENTRY name="DeployPassword" value="true"/>
    </ConnectionDefinition>
    </BC4JConfig>
    and our jclient code to release connection like following:
    tabbedPane.addCloseListener(new CloseListener(){
    public void closeOperation(MouseEvent e){       
    cleanTabComponentListener(tabbedPane.getComponentAt(tabbedPane.getOverTabIndex()));
    tabbedPane.remove(tabbedPane.getOverTabIndex());
    UPanelBinding panelbd = tabbedPane.getPanelBinding();
    panelbd.releaseDataControl();
    panelbd.getBindingContext().release();
    }

  • BC4J DO NOT RE-USE THE ''INACTIVE'' CONNECTIONS, DATABASE IS SATURATED

    We developed a J2EE Web application based on the BC4J Framework.
    We're using JDevelopper 9.0.3.2 (9.0.2.822 before). The web application is rolled out on Oracle
    9ias 9.0.2 patchset 3.
    The database used is oracle 9i 9.2.0.
    We used the following code to connect to the BC4J:
    public void openConnection() {
    m_appModule = null;
    while (m_appModule == null)
    try
    m_appModule =
    Configuration.createRootApplicationModule(
    m_sAppModuleName,m_sAppModuleConfigName);
    } catch (JboException e) {
    if
    (e.getErrorCode().equalsIgnoreCase(AMPoolMessageBundle.EXC_AMPOOL_COOK
    IE_ALREADY_EXISTS)){
    try {
    Thread.currentThread().sleep(5);
    } catch (InterruptedException m) {
    }else
    throw e;
    The following code closes the connection to the BC4J
    public void closeConnection() {
    Configuration.releaseRootApplicationModule(m_appModule,true);
    m_appModule = null;
    The pooling parameters are the same as the default ones in Jdevelopper.
    We noted that certain connections created by the BC4J in the database were
    turned "inactive" and were never re-used.
    After a certain time, "inactive" connections multiply and the database is
    completely saturated.
    The BC4J do not re-use the "inactive" connections but try to create new ones.
    The "inactive" connections that are never re-used are never killed.
    Our only solution is to reboot the database server or the application OC4J
    instance to suppress the "inactive" connections.
    We tried to configure the BC4J pool in Jdeveloper, but it doesn't work in 9IAS.
    Could you please clarify what the problem is? Looking forward to receiving your
    feedback on this pressing issue, regards.
    Stéphane CHEVALLET

    I'm hitting the same problem.
    have you managed to solve it ? please share your wisdom :)
    Best Regards
    Rui Madaleno

  • Release the connection in JMS Adapter

    Hi,
    I’m sending the message to JMS queue (queue is running in weblogic server) using JMS Adapter in BPEL. My question is how to release the weblogic connection once the message produced to queue. It is happen automatically or we have to release the connection explicitly. If it explicit handle means how to do it?
    It would very helpful for me if you send any reference doc or url about this.
    Thanks in Advance.
    Thanks
    Chandramohan

    The JMS adapater of SOA will handle this for you. You do not have to do anything with closing connections.
    Marc

  • WLS5.1 - How to configure WLS5.1 to release "unclosed" connections?

              Hi all,
              is there any feature or detector element in WLS5.1 to release connections back
              to the pool if they were not closed properly by the application? If not, is there
              any alternative to overcome the problem?
              Please advice! Thanks!
              Best Regards,
              Winnie
              

              "Winnie Ngiam" <[email protected]> wrote:
              >
              >Hi all,
              >
              >is there any feature or detector element in WLS5.1 to release connections
              >back
              >to the pool if they were not closed properly by the application? If not,
              >is there
              >any alternative to overcome the problem?
              >
              >Please advice! Thanks!
              >
              >Best Regards,
              >Winnie
              Hi WInnie,
              you can set timeouts for releasing the connection pool if the connection
              is not properly closed by using
              the following way for a T3CLient like :
              t3.setSoftDisconnectTimeoutMins(2);
              for further calrifications let me know.
              http://www.weblogic.com/docs51/classdocs/API_jdbct3.html#startupconnpool
              rgds
              SureshKumar
              

  • Does transaction manager also releases the connections ?

    Hi All,
    I've a doubt regarding release of connection in transaction handling scenarios in EJB.
    Let us assume I have an EJB method associated with a transaction attribute as Requires New (i.e. the ejb method is associated with container managed transaction).
    Within that method two diffreent databasess are accessed, connections are created, databases are updated but connections are not realeased.
    The code goes similar to the one given below -
    public void beanMethod1()
    InitialContext cntx = new InitialContext();
    javax.sql.DataSource ds1 = cntx.lookup("dataSourceName1");
    javax.sql.DataSource ds2 = cntx.lookup("dataSourceName2");
    java.sql.Connection conn1 = ds1.getConnection();
    ds1.setAutoCommit(false);
    PreparedStatement pst1 = ds1.prepareStatement("Qyery1");
    pst1.executeUpdate();
    java.sql.Connection conn2 = ds2.getConnection();
    ds2.setAutoCommit(false);
    PreparedStatement pst2 = ds2.prepareStatement("Qyery2");
    pst2.executeUpdate();
    Now in this context my doubt is - will the transaction manager, along with handling commit/rollback, release the connections also (once commit/rollback is over) ? Or releasing of connections need to be handled in the bean method ?
    If releasing connections has to be handled in the bean method, then how does transaction manager execute a commit/rollback on a released connection ?
    The same doubt can be extended to bean managed transaction also where transaction boundarry is demarcated using javax.transaction.UserTransaction object's begin(), commit() and rollback() methods.
    It will be a real help if anyone please throw some light on this doubt.
    Thanks in advance,
    Sourav

    Hi,
    Your code needs to release (i.e., close) the connections it uses; this is outside the TM responsibility scope.
    The commit or rollback is not a problem, because the corresponding XAResource (which is the
    transaction manager's handle to your connection) can be used even after your connection
    has been closed in the application code. That is the catch about XA, and it allows the whole
    mechanism of connection pooling and DataSources to work properly.
    Hope that helps,
    Guy

  • Cmp entity not releasing db connections

    How can I make sure cmp entity bean releases database connection to
    the connection pool after some time in oc4j 9.0.2 (ejb 1.1)?
    I am using ejb-location in orion-ejb-jar.xml as data-source.
    max-connections="30" after 30 connections it starts timing out.
    Is there something I have to do in my entities?
    Thanks-
    ak

    How can I make sure cmp entity bean releases database connection to
    the connection pool after some time in oc4j 9.0.2 (ejb 1.1)?
    I am using ejb-location in orion-ejb-jar.xml as data-source.
    max-connections="30" after 30 connections it starts timing out.
    Is there something I have to do in my entities?
    Thanks-
    ak

  • Inactive Connections Problems

    Hi,
    I have an ASp.NET (C#) application, using OLEDB driver, Oracle 9i. Using the normal string connection we have some problems, because when we close the connection, it still opened, inactive but opened in the DB. What should I do to kill the inactive connections?
    Thank's
    Message was edited by:
    JP®

    Hi Sergio,
    I found some answers here. Some people said that the right way to deal and end with Inactive Connections, is creating a new profile, and setting a value to the idle_time parameter, ex: idle_time=3, so after 3 minutes inactive the connection is severed. Or creating a procedure, and this procedure will deal and kill the inactive connections.
    I don't know what else I can do?
    But, I'm sorry, I thought that here is the right forum, thank you for the information, I'll post it in the right one.
    JP®

  • LMS 4.2 is not releasing SSH connections of the devices

    Hello!
    We have LMS opens SSH sessions to Nexus 5000 devices as part of some jobs.
    These SSH connections are not being released by LMS as soon as jobs are completed, which leads the N5K devices to hang without any way of managing them remotely.
    We see these connections as idle on the nexus devices (which also should kill these sessions, but this is not the issue).
    We have found a known bug:
    CSCty90928
    LMS Pari jobs are not releasing SSH,telnet connections of the devices
    Symptom:
    Telnet/SSH connections are not released by LMS
    Conditions:
    Pari collections jobs are not releasing the connections after the Job completed
    Workaround:
    None
    This bug is categorized as "2 – severe" and is in "Open (Postponed)" status.
    I have a few questions, if anyone can assist:
    1.) What is the ETA to fix this bug?
    2.) Are there any other known bugs matching what we see (documented public bugs, with bug ID's, internal bugs or even undocumented bugs).
    3.) Is there any released or unreleased (even yet to be tested by TAC) patch we can use that should fix the issue?
    4.) Is there any way to adjust LMS idle timeout of SSH/Telnet sessions (I couldn't find it in the GUI, but maybe there is a way to change this parameter using a perl script or modifying one of LMS properties files)?
    Thanking in advance, Udi Dahan.

    Hello Ehud
    From N5k side we have submitted bug CSCty00044
    Currently there is no fix for it and our debelopment team is catively working on it and investigating the issue in the lab.
    To get ETA for the release I would suggest you reach your account team and check with them how fast fixed release will be available.
    HTH,
    Alex

  • Oci_close does not release the connection when using DRCP

    Hello everyone,
    we are currently testing the deplyment of DRCP with 11g. I have the whole thing setup (correctly to my best knowledge), but I am facing an issue. The call to oci_close does not seem to release the connection to the pool as I would expect and therefore we see similar behavior like we were getting without using the DRCP.
    Our setup is using two RAC instances running 11.1.0.6.0, I am using PHP 5.1.6 with PECL installed oci8 1.3.4. The DRCP pool is configured and started, each with 100 max servers.
    When the webserver is idle it looks, well, idle.
    SQL> SELECT INST_ID,NUM_BUSY_SERVERS FROM GV$CPOOL_STATS;
    INST_ID NUM_BUSY_SERVERS
    1 0
    2 0
    The script is as simple as it gets:
    <?php
    $c = oci_pconnect('scott','tiger','IWPPOOLED');
    $s = oci_parse($c, 'select * from emp');
    $r = oci_execute($s, OCI_DEFAULT);
    oci_close($c);
    sleep(30);
    ?>
    What I would expect is that the script would connect to the pool, do the work for a tiny moment and then release the connection for usage by other script.
    But after I point the browser to the script, I get a 30 second loading time (as expected) but the server is busy all the time, like this:
    SQL> SELECT INST_ID,NUM_BUSY_SERVERS FROM GV$CPOOL_STATS;
    INST_ID NUM_BUSY_SERVERS
    1 0
    2 1
    After the 30 second sleep, it is released and busy servers are back to 0.
    If I load the server with ab using 256 connections:
    ab -n 1000000 -c 256 -k http://mywebserver/ocitest.php
    the pool is maxed out and the connects are stalling:
    SQL> SELECT INST_ID,NUM_BUSY_SERVERS FROM GV$CPOOL_STATS;
    INST_ID NUM_BUSY_SERVERS
    1 95
    2 95
    My network config for this service is following:
    IWPPOOLED =
    (DESCRIPTION =
    (LOAD_BALANCE=ON)
    (FAILOVER=ON)
    (ADDRESS = (PROTOCOL = tcp)(HOST = 10.1.16.33)(PORT = 1521))
    (ADDRESS = (PROTOCOL = tcp)(HOST = 10.1.16.34)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = IWP)
    (SERVER=POOLED)
    (FAILOVER_MODE=
    (TYPE=SELECT)
    (METHOD=BASIC)
    (RETRIES=5)
    (DELAY=3)
    The phpinfo() look like this:
    OCI8 Support enabled
    Version 1.3.4
    Revision $Revision: 1.269.2.16.2.38.2.20 $
    Active Persistent Connections 1
    Active Connections 1
    Oracle Instant Client Version 11.1
    Temporary Lob support enabled
    Collections support enabled
    Directive Local Value Master Value
    oci8.connection_class IWPAPP IWPAPP
    oci8.default_prefetch 100 100
    oci8.events On On
    oci8.max_persistent -1 -1
    oci8.old_oci_close_semantics Off Off
    oci8.persistent_timeout -1 -1
    oci8.ping_interval -1 -1
    oci8.privileged_connect Off Off
    oci8.statement_cache_size 20 20
    I am using the instant client for 11g
    Any ideas?
    Thanks!
    Michal

    Don't forget to use oci_free_statement($s); See "Closing Oracle Connections" in The Underground PHP and Oracle Manual. (I was just simplifying this example today for the next release of the manual).
    You may also see the "dedicated optimization", where a pooled server in a non- maxed-out pool is retained (unless needed by another PHP process) under the assumption that the initial PHP process might become active again. See http://www.oracle.com/technology/tech/php/pdf/php-scalability-ha-twp.pdf
    Feel free to email me offline (see my profile) if there are questions/data you don't want to post.
    cj
    Edited by: cj2 on Oct 16, 2008 8:12 AM

  • Inactive connections

    I am using Oracle, java, jsp, JNDI datasource look up for this web application. The application makes numerous connections with database, executes queries, load the results into arraylists or vectors and connections get closed as soon as the resultset is loaded into a collection object.
    when I was load testing, I found out several inactive connections in the database side. This is so puzzling. I have been struggling for more than I should.
    these are my datasource settings in my server.xml file:
    <ResourceParams name="jdbc/myoracle">
    <parameter>
    <name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>oracle.jdbc.driver.OracleDriver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:oracle:oci8:@mydb</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>user</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>pass</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>20</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>20</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>20000</value>
    </parameter>
    </ResourceParams>
    Please HELP!!!!!
    Suraj

    Hi,
    It may be due to the connection pooling used.
    A "closed" (to application context) connection is
    returned to the pool for later reused, (in database
    context, these connection is still open).
    May be can find out more from the dbcp API?Hi
    Anybody has any problems with this and has anybody found solutions?
    I am setting up the maxActive datasource parameter value as 20 and maxIdle parameter 20. but these parameters are getting completely ignored. when I load tested, there are 55 active and inactive connections together even after each time the connection, statement and resultset are closed.
    I think It is to do with tomcat. When I restart tomcat, all the connections disappear.
    Suraj

  • Oc4j connection pool: too much INACTIVE connections

    I am publishing an application - developed using Eclipse and previously published in Tomcat (where it works perfectly for a long time) - within corporate servers using Oc4j version 10.1.3. The database server is Oracle 9g.
    After the deployment operation, the application seems to work, but that happens during the work by users, there are still many connections whith status "INACTIVE", until to complete all the available connections.
    The datasource is set as follows:
    <connection-pool name="ConnectionPoolRichiestaPubblicazione">
    <connection-factory factory-class="oracle.jdbc.pool.OracleDataSource"
    user="REDAZIONE"
    password="password"
    url="jdbc:oracle:thin:@(DESCRIPTION=(FAILOVER=ON)
         (ADDRESS_LIST=(LOAD_BALANCE=ON)
         (ADDRESS=(PROTOCOL=TCP)
         (HOST=10.146.2.86)(PORT=1521))
         (ADDRESS=(PROTOCOL=TCP)(HOST=10.146.2.86)(PORT=1521)))
         (CONNECT_DATA=
    (SERVER=DEDICATED)
    (SERVICE_NAME=XE)
    (FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC)(RETRIES=180)(DELAY=5))))">
    </connection-factory>
    </connection-pool>
    <managed-data-source
    jndi-name="jdbc/RichiestaPubblicazioneDS"
    name="RichiestaPubblicazioneDS"
    connection-pool-name="ConnectionPoolRichiestaPubblicazione" />
    The java code to establish a connection is as follows:
    private Connection creaConnessioneDataSource(String nomedatasource) throws ConnessioneException{
              LOGGER.debug("START");
              try {
                   InitialContext context = new InitialContext();
                   DataSource ds = (DataSource)context.lookup(nomedatasource);
                   LOGGER.debug("URL DATASOURCE : " + ds.getConnection().getMetaData().getURL());
                   LOGGER.debug("USERNAME : " + ds.getConnection().getMetaData().getUserName());
                   this.conn = ds.getConnection();
              catch( Exception e ) {
                   LOGGER.error("Errore nella connessione tramite datasource : " + StringUtils.getCustomStackTrace(e));
              LOGGER.debug("END");
              return this.conn;
    Connections and statements are closed using the following methods:
         public boolean chiudi(Connection conn){
              LOGGER.debug("START");
              boolean esito = false;
              if (conn != null){
                   try {
                        conn.close();
                        esito = true;
                        LOGGER.debug("Connessione chiusa");
                   catch (SQLException e) {
                        LOGGER.error("Eccezione nella chiusura della connessione : " + e);
              LOGGER.debug("END");
              return esito;
         public boolean chiudi(Statement stmt){
              LOGGER.debug("START");
              boolean esito = false;
              if (stmt != null){
                   try {
                        stmt.close();
                        esito = true;
                        LOGGER.debug("Statement chiuso");
                   } catch (SQLException e) {
                        LOGGER.error("Eccezione nella chiusura dello statement : " + e);
                        e.printStackTrace();
              LOGGER.debug("END");
              return esito;
    Here are a couple of examples of code that interact with the database:
         public List<StatoRichiestaSintesi> getElencoStatiRichieste() throws ConnessioneException{
              LOGGER.debug("START");
              List<StatoRichiestaSintesi> listaStati=new LinkedList<StatoRichiestaSintesi>();
              LOGGER.debug("Apriamo connessione e statement");
              Connection conn = databaseManager.creaConnessioneDataSource(datasource);
              Statement stmt = databaseManager.creaStatement(conn, false);
              String sql="SELECT * FROM STATORICHIESTA";
              try {
                   ResultSet rs = stmt.executeQuery(sql);
                   while(rs.next()){
                        StatoRichiestaSintesi temp=new StatoRichiestaSintesi();
                        temp.setIdStato(rs.getString(1));
                        temp.setDescrizioneStato(rs.getString(2));
                        listaStati.add(temp);
                   LOGGER.debug("Numero record trovati : " + listaStati.size());
              } catch (SQLException e) {
                   LOGGER.error("Eccezione di tipo SQL : " + StringUtils.getCustomStackTrace(e));
              finally{
                   LOGGER.debug("Chiusura di statement e connessione");
                   databaseManager.chiudi(stmt);
                   databaseManager.chiudi(conn);
              LOGGER.debug("END");
              return listaStati;
    Below is another example using PreparedStatement:
         private synchronized void aggiungiIndicazioneProgetto(String idprogetto, String idrichiesta) {
              LOGGER.debug("START");
              LOGGER.debug("Creo un oggetto di tipo connessione");
              Connection conn = databaseManager.creaConnessioneDataSource(datasource);
              LOGGER.debug("Definisco una query sql");
              String sql = "INSERT INTO RICHIESTAPROGETTO (IDRICHIESTA,IDPROGETTO) VALUES (?,?)";
              LOGGER.debug("Dichiaro un oggetto di tipo preparedstatement");
              PreparedStatement stmt = null;
              try {
                   LOGGER.debug("Istanzio l'oggetto statement");
                   stmt = conn.prepareStatement(sql);
                   LOGGER.debug("Imposto i segnalibri della query");
                   stmt.setString(1, idrichiesta);
                   stmt.setString(2, idprogetto);
                   LOGGER.debug("Eseguo la query di inserimento del progetto");
                   stmt.executeUpdate();
              } catch (SQLException e) {
                   LOGGER.error("Eccezione di tipo SQL : " + StringUtils.getCustomStackTrace(e));
              finally {
                   LOGGER.debug("Chiusura di statement e connessione");
                   databaseManager.chiudi(stmt);
                   databaseManager.chiudi(conn);
              LOGGER.debug("END");
         Which may be the cause for the described behavior?
         I hope someone help me..

    My problem is the following.
    If I deploy my application with the illustred datasource in my local OC4J (10.1.3 in a Standalone Environment) all work fine.
    The application creates a reasonable number of connections (in ORACLE - 10g Enterprise Edition Release 10.2.0.4.0 - db I run the query verification "select count(*) from v$session where username='MYAPPLICATION'"), and overall performance is very good.
    If, however, to deploy on the production machine of corporate (always 10.1.3, but obviously in Oracle Application Server Environment) the
    number of connections (status 'INACTIVE') grows massively, and this is saturated in a short time.
    The exception that at the end from the application is that:
    java.sql.SQLException: ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux Error: 2: No such file or directory
    oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
    oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
    oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:277)
    oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
    oracle.jdbc.driver.T4CTTIoauthenticate.receiveOsesskey(T4CTTIoauthenticate.java:243)
    oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:304)
    oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:430)
    oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
    oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
    oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:608)
    oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:218)
    oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:114)
    oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:77)
    oracle.jdbc.pool.OracleImplicitConnectionCache.makeCacheConnection(OracleImplicitConnectionCache.java:1361)
    oracle.jdbc.pool.OracleImplicitConnectionCache.getCacheConnection(OracleImplicitConnectionCache.java:441)
    oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:336)
    oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:286)
    oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:179)
    oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:159)
    oracle.oc4j.sql.DataSourceConnectionPoolDataSource.getPooledConnection(DataSourceConnectionPoolDataSource.java:57)
    oracle.oc4j.sql.xa.EmulatedXADataSource.getXAConnection(EmulatedXADataSource.java:92)
    oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createXAConnection(ManagedConnectionFactoryImpl.java:211)
    oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:170)
    com.evermind.server.connector.ApplicationConnectionManager.createManagedConnection(ApplicationConnectionManager.java:1377)
    oracle.j2ee.connector.ConnectionPoolImpl.createManagedConnectionFromFactory(ConnectionPoolImpl.java:327)
    oracle.j2ee.connector.ConnectionPoolImpl.access$800(ConnectionPoolImpl.java:98)
    also I add the other attributes of Connection Pool of the Datasource:
    Connections:
    Initial size of Connection Cache = 0     
    Minimum Number of Connections = 0
    Maximum Number of Connections = -1
    Connection Retry Interval (seconds) = 1
    Maximum Connection Attempts = 3
    Maximum Number of Statements Cached = 0     
    Lower Threshold Limit On Pool (%)= 20     
    Validate Connection = False
    What I can do?
    many thanks..

Maybe you are looking for

  • SAP R/3 vs SAP BW

    HI can anybody give me links to good document which explains clearly 1) how to do reporting in SAP R/3 & its advantages & disadvantages 2) Why is SAP BW actually required --what is special in BW what other SAP modules cant do? 3) Advantages of SAP BW

  • "There was a problem enabling iCloud Backup"

    I currently have an iPad 2, and my husband has an iPod Touch (not sure of the generation - its about a year old). As of tomorrow, we'll both have iPhone 4S's.    We both use my iTuned account for purchasing apps and music. I've finally got iOS 5 up a

  • Unable to share iTunes from macbook pro to mac mini

    I have a Macbook Pro  and a Mac Mini both running 10.6.8. They are connected wirelessly and I can open the Macbook Pro from the Mac Mini. However I cannot share the iTunes from the Macbook Pro to the Mac Mini. No Shared item comes up in the Library l

  • Drag and drop from itune store to a library playlist

    opened into itunes for the first time since updating to 9.0.1 and found that I cannot drag and drop (unpurchased) songs from the store to library playlists. is there a solution to this beyond downgrading to previous version? thanks

  • Script for smartphones

    Hi All, I haven't used DW in quite awhile. Every so often I update/upgrade my (small company) website. I usually purchase templates that I can adjust rather than code from scratch. I have more of a design background and not so much code expertise. Re