SANJAY HALDAR
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.SocketOutputStrea m.socketWr ite0(Nativ e Method)
at java.net.SocketOutputStrea m.socketWr ite(Socket OutputStre am.java:92 )
at java.net.SocketOutputStrea m.write(So cketOutput Stream.jav a:136)
at oracle.net.ns.DataPacket.s end(DataPa cket.java: 200)
at oracle.net.ns.NetOutputStr eam.flush( NetOutputS tream.java :230)
at oracle.net.ano.AnoComm.b(U nknown Source)
at oracle.net.ano.Ano.negotia tion(Unkno wn Source)
at oracle.net.ns.NSProtocol.c onnect(NSP rotocol.ja va:438)
at oracle.jdbc.driver.T4CConn ection.con nect(T4CCo nnection.j ava:1056)
at oracle.jdbc.driver.T4CConn ection.log on(T4CConn ection.jav a:308)
at oracle.jdbc.driver.Physica lConnectio n.<init>(P hysicalCon nection.ja va:538)
at oracle.jdbc.driver.T4CConn ection.<in it>(T4CCon nection.ja va:228)
at oracle.jdbc.driver.T4CDriv erExtensio n.getConne ction(T4CD riverExten sion.java: 32)
at oracle.jdbc.driver.OracleD river.conn ect(Oracle Driver.jav a:521)
at weblogic.jdbc.common.inter nal.Connec tionEnvFac tory.makeC onnection( Connection EnvFactory .java:350)
at weblogic.jdbc.common.inter nal.Connec tionEnvFac tory.creat eResource( Connection EnvFactory .java:236)
at weblogic.common.resourcepo ol.Resourc ePoolImpl. makeResour ces(Resour cePoolImpl .java:1249 )
at weblogic.common.resourcepo ol.Resourc ePoolImpl. makeResour ces(Resour cePoolImpl .java:1166 )
at weblogic.common.resourcepo ol.Resourc ePoolImpl. reserveRes ourceInter nal(Resour cePoolImpl .java:450)
at weblogic.common.resourcepo ol.Resourc ePoolImpl. reserveRes ource(Reso urcePoolIm pl.java:34 2)
at weblogic.jdbc.common.inter nal.Connec tionPool.r eserve(Con nectionPoo l.java:419 )
at weblogic.jdbc.common.inter nal.Connec tionPool.r eserve(Con nectionPoo l.java:324 )
at weblogic.jdbc.common.inter nal.Connec tionPoolMa nager.rese rve(Connec tionPoolMa nager.java :94)
at weblogic.jdbc.common.inter nal.Connec tionPoolMa nager.rese rve(Connec tionPoolMa nager.java :63)
at weblogic.jdbc.jts.Driver.n ewConnecti on(Driver. java:915)
at weblogic.jdbc.jts.Driver.c reateLocal Connection (Driver.ja va:327)
at weblogic.jdbc.jts.Driver.c onnect(Dri ver.java:1 73)
at weblogic.jdbc.common.inter nal.RmiDat aSource.ge tConnectio n(RmiDataS ource.java :364)
at com.fortressit.ejb.EJB11.E JB11Contex t.getConne ction(EJB1 1Context.j ava:144)
at com.sns.base.util.DBConnec tion.getCo nnection(D BConnectio n.java:139 )
Caused By: java.net.SocketException: Broken pipe
at java.net.SocketOutputStrea
at java.net.SocketOutputStrea
at java.net.SocketOutputStrea
at oracle.net.ns.DataPacket.s
at oracle.net.ns.NetOutputStr
at oracle.net.ano.AnoComm.b(U
at oracle.net.ano.Ano.negotia
at oracle.net.ns.NSProtocol.c
at oracle.jdbc.driver.T4CConn
at oracle.jdbc.driver.T4CConn
at oracle.jdbc.driver.Physica
at oracle.jdbc.driver.T4CConn
at oracle.jdbc.driver.T4CDriv
at oracle.jdbc.driver.OracleD
at weblogic.jdbc.common.inter
at weblogic.jdbc.common.inter
at weblogic.common.resourcepo
at weblogic.common.resourcepo
at weblogic.common.resourcepo
at weblogic.common.resourcepo
at weblogic.jdbc.common.inter
at weblogic.jdbc.common.inter
at weblogic.jdbc.common.inter
at weblogic.jdbc.common.inter
at weblogic.jdbc.jts.Driver.n
at weblogic.jdbc.jts.Driver.c
at weblogic.jdbc.jts.Driver.c
at weblogic.jdbc.common.inter
at com.fortressit.ejb.EJB11.E
at com.sns.base.util.DBConnec
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"
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?
ASKER
There is generic firewall for the network as always.
So that kills the connections, enjoy
ASKER
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.
# 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.
# experience.
ASKER
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?
BTW, can it be ensured that firewall doesn't drop the connection state, any measure?
Dont use long idle connections.
ASKER
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.
ASKER
Was your last comment relevant to my previous query
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What makes you think there is a stuck thread? Was it normal before?