Link to home
Start Free TrialLog in
Avatar of SANJAY HALDAR
SANJAY HALDARFlag for India

asked on

Stuck thread in application running in Welogic 10.3.5

We have encountered Stuck thread in application running in Welogic 10.3.5, below is the cause found in the logs:
Caused By: java.net.SocketException: Broken pipe
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at oracle.net.ns.DataPacket.send(DataPacket.java:200)
        at oracle.net.ns.NetOutputStream.flush(NetOutputStream.java:230)
        at oracle.net.ano.AnoComm.b(Unknown Source)
        at oracle.net.ano.Ano.negotiation(Unknown Source)
        at oracle.net.ns.NSProtocol.connect(NSProtocol.java:438)
        at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1056)
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:308)
        at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:538)
        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 weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:350)
        at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:236)
        at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1249)
        at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1166)
        at weblogic.common.resourcepool.ResourcePoolImpl.reserveResourceInternal(ResourcePoolImpl.java:450)
        at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:342)
        at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:419)
        at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:324)
        at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(ConnectionPoolManager.java:94)
        at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(ConnectionPoolManager.java:63)
        at weblogic.jdbc.jts.Driver.newConnection(Driver.java:915)
        at weblogic.jdbc.jts.Driver.createLocalConnection(Driver.java:327)
        at weblogic.jdbc.jts.Driver.connect(Driver.java:173)
        at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:364)
        at com.fortressit.ejb.EJB11.EJB11Context.getConnection(EJB11Context.java:144)
        at com.sns.base.util.DBConnection.getConnection(DBConnection.java:139)
Avatar of gheist
gheist
Flag of Belgium image

Database connection disconnected mid transaction, and exception was not handled...  
What makes you think there is a stuck thread? Was it normal before?
Avatar of SANJAY HALDAR

ASKER

Thanks for the response.
Stuck thread noticed in one of our instance and we have seen the above mentioned traces in the logs. This API functions normally, is surge in the incoming request can trigger the broken pipe. What could the reason for the "Database connection disconnected mid transaction"
Any firewall around database? Like windows or iptables?
There is generic firewall for the network as always.
So that kills the connections, enjoy
you mean to say the firewall kills the connection, if yes, I have the following queries:

# If firewall is killing the  connections, then we should encounter the issue always.
# What is the background of proving that  firewall is killing the  connection, so that we can take up to the infra level.
# it is not killing connection. it drops connection state and no longer forwards packets
# experience.
So, the deficiency which we have in the code is that the exception wasn't handled.
BTW, can it be ensured that firewall doesn't drop the connection state, any measure?
Dont use long idle connections.
Would it be possible for you to demonstrate a sample piece of code which ensures that the connections are not hold idle OR to avoid using the idle connection
socket was broken... What else you need.
Was your last comment relevant to my previous query
ASKER CERTIFIED SOLUTION
Avatar of gheist
gheist
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial