Solved

Stuck thread in application running in Welogic 10.3.5

Posted on 2014-09-18
13
411 Views
Last Modified: 2014-10-19
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)
0
Comment
Question by:SANJAY HALDAR
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
13 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 40331961
Database connection disconnected mid transaction, and exception was not handled...  
What makes you think there is a stuck thread? Was it normal before?
0
 

Author Comment

by:SANJAY HALDAR
ID: 40336621
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"
0
 
LVL 62

Expert Comment

by:gheist
ID: 40336642
Any firewall around database? Like windows or iptables?
0
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 

Author Comment

by:SANJAY HALDAR
ID: 40338339
There is generic firewall for the network as always.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40338378
So that kills the connections, enjoy
0
 

Author Comment

by:SANJAY HALDAR
ID: 40343427
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.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40344384
# it is not killing connection. it drops connection state and no longer forwards packets
# experience.
0
 

Author Comment

by:SANJAY HALDAR
ID: 40345491
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?
0
 
LVL 62

Expert Comment

by:gheist
ID: 40345608
Dont use long idle connections.
0
 

Author Comment

by:SANJAY HALDAR
ID: 40352225
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
0
 
LVL 62

Expert Comment

by:gheist
ID: 40352250
socket was broken... What else you need.
0
 

Author Comment

by:SANJAY HALDAR
ID: 40361485
Was your last comment relevant to my previous query
0
 
LVL 62

Accepted Solution

by:
gheist earned 500 total points
ID: 40361577
Stack trace comes from:
at com.fortressit.ejb.EJB11.EJB11Context.getConnection(EJB11Context.java:144)
        at com.sns.base.util.DBConnection.getConnection(DBConnection.java:139)


so check that line and handle the exception when socket times out.
or close them before firewall does
or make some query on schedule
0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Safari, Firefox, IE, Java, Plugin, Java Security error 13 83
listing all functions in JavaScript 19 253
web project error add remove 1 84
Can't connect to FTP 18 155
Introduction People like FTP.  It's a solid, stable, robust protocol for quickly transferring files between two hosts using TCP/IP.  In most cases it's much faster than SMB or CIFS, and certainly much easier to set up between organizations.  This…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question