0 Replies Latest reply on May 2, 2016 8:59 AM by Mohan Sareddy

    All Threads blocked at socket connection while getting oracle database connection

    Mohan Sareddy Newbie

      Hi,

       

      I am doing a performance testing with 500 concurrent user sessions on my application. I have set the maximum connection pool to 300. As soon as the load of 500 users is reached, the jboss threads are blocked for 30 seconds. I have a database server configuration with 1000 connections limit. Can I know the reason why the threads are blocked. I have observed that most of the threads are blocked with a thread dump of below 2 pl:

       

      First one:

      "Thread-142" Id=694 in BLOCKED on lock=org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory@29a7c76c

           owned by JCA PoolFiller Id=79

          at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnectionFactory.getConnectionProperties(BaseWrapperManagedConnectionFactory.java:497)

          at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.matchManagedConnections(XAManagedConnectionFactory.java:498)

          at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:225)

          at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:746)

          at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)

          at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:424)

          at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)

          at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)

          at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:96)

          at atg.service.jdbc.WatcherDataSource.getConnection(WatcherDataSource.java:845)

          at atg.service.jdbc.WatcherDataSource.getConnection(WatcherDataSource.java:825)

          at atg.adapter.gsa.GSATransaction.getConnection(GSATransaction.java:794)

          at atg.adapter.gsa.GSAItemDescriptor.getConnection(GSAItemDescriptor.java:2732)

          at atg.adapter.gsa.GSAItemDescriptor.updateItem(GSAItemDescriptor.java:7541)

          at atg.adapter.gsa.GSARepository.updateItem(GSARepository.java:1075)

          at atg.commerce.order.processor.ProcSaveOrderObject.runProcess(ProcSaveOrderObject.java:202)

          at atg.service.pipeline.PipelineLink.runProcess(PipelineLink.java:255)

          at atg.service.pipeline.PipelineChain.runProcess(PipelineChain.java:365)

          at atg.service.pipeline.PipelineChainContext.runProcess(PipelineChainContext.java:207)

          at atg.service.pipeline.PipelineManager.runProcess(PipelineManager.java:475)

          at atg.commerce.pipeline.CommercePipelineManager.runProcess(CommercePipelineManager.java:123)

          at atg.commerce.order.OrderManager.updateOrder(OrderManager.java:2923)

          at atg.commerce.order.purchase.PurchaseProcessHelper.addItemsToOrder(PurchaseProcessHelper.java:973)

          at atg.commerce.order.purchase.CartModifierFormHandler.doAddItemsToOrder(CartModifierFormHandler.java:3471)

          at atg.commerce.order.purchase.CartModifierFormHandler.addItemToOrder(CartModifierFormHandler.java:3094)

       

       

       

      Second one:

       

      "Thread-361" Id=914 in BLOCKED

          at java.net.PlainSocketImpl.socketConnect(Native Method)

          at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)

          at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)

          at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)

          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)

          at java.net.Socket.connect(Socket.java:529)

          at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:209)

          at oracle.net.nt.ConnOption.connect(ConnOption.java:123)

          at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:353)

          at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:422)

          at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:678)

          at oracle.net.ns.NSProtocol.connect(NSProtocol.java:238)

          at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1054)

          at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:308)

          at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:536)

          at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:228)

          at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)

          at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)

          at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:280)

          at oracle.jdbc.xa.client.OracleXADataSource.getPooledConnection(OracleXADataSource.java:482)

          at oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:156)

          at oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:130)

          at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:466)

          at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:426)

          at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:650)

       

       

      What can be the reasons of the threads blocked?

       

      Regards

      Mohan