Weblogic Stuck Thread on JDBC Call

We often get a series of stuck threads on our Weblogic servers. I analyzed this over a period of time.

What I would like to understand is whether this stuck stream block indicates that it is still reading data from the open socket into the database, since the queries are simple SELECT elements?

at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at oracle.net.ns.Packet.receive(Packet.java:239) at oracle.net.ns.DataPacket.receive(DataPacket.java:92) 

We ran netstat and other commands, the sockets from the Weblogic application server to the database correspond to the number of connections in the pool.

Any ideas what else we should explore here?

Stream dump stack trace:

 "[STUCK] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'" daemon prio=10 tid=0x61a5b000 nid=0x25f runnable [0x6147b000..0x6147eeb0] java.lang.Thread.State: RUNNABLE at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at oracle.net.ns.Packet.receive(Packet.java:239) at oracle.net.ns.DataPacket.receive(DataPacket.java:92) at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:172) at oracle.net.ns.NetInputStream.read(NetInputStream.java:117) at oracle.net.ns.NetInputStream.read(NetInputStream.java:92) at oracle.net.ns.NetInputStream.read(NetInputStream.java:77) at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1023) at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:999) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:584) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183) at oracle.jdbc.driver.T4CStatement.fetch(T4CStatement.java:1000) at oracle.jdbc.driver.OracleResultSetImpl.close_or_fetch_from_next(OracleResultSetImpl.java:314) - locked <0x774546e0> (a oracle.jdbc.driver.T4CConnection) at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:228) - locked <0x774546e0> (a oracle.jdbc.driver.T4CConnection) at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.next(Unknown Source) 

a bit starting with weblogic.work.ExecuteThread.run here has been omitted. We have 8 sets of thread dumps - and each shows a thread waiting on the same line, and the same object is blocked

 at oracle.jdbc.driver.OracleResultSetImpl.close_or_fetch_from_next(OracleResultSetImpl.java:314) - locked <0x774546e0> (a oracle.jdbc.driver.T4CConnection) 
+4
source share
2 answers

At the time the stack was printed, it seems to be locked, waiting for more data from the server

 at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:228) 

Perhaps this is just a request that takes more than StuckThreadMaxTime , and WL throws a warning.

If possible, I will try:

  • Find which requests or requests delay threads and check runtime
  • Using Wireshark to analyze database communications
  • Look at the driver source code (JD comes to mind) to understand the stack trace
+4
source

if you use the weblogic -Dweblogic.debug.DebugJDBCSQL debug flags, you can track the SQL that is actually running

+3
source

Source: https://habr.com/ru/post/1333022/


All Articles