on ‎2018 Nov 03 5:46 PM
In our application we can see cart is getting locked for many users. We are using oracle database . Each cart is getting locked , DBA can find idle inactive blocking session in db end which is locking cart. In our application end we can see many blocked thread which are trying to to db operation on same cnd one runnable thread which is doing operation locking cart. Why this happens . Users has tendency to open multiple session using same credential multiple times for our application. Could someone please explain why this situation happen and how this can be fixed.
Request clarification before answering.
you need to do analysis on both sides - JVM and DB,
in your particular case:
as you see a JVM Thread executing an update on DB then most probably a corresponding DB session cannot proceed because of the DB object lock held by another DB session
Identify that holder lock DB session, find who is responsible for it (JDBC connection from machine X)
find in the JVM of machine X running threads which cannot proceed further due to numerous reasons - also waiting for a DB lock, maybe JVM lock, etc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In our application Thread dump I can see the below runnable thread while in Oracle db DBA can find that session is inactive which is holding lock. Please suggest.
ajp-nio-8009-exec-37" prio=5 tid=0x175 nid=0xaf RUNNABLE (JNI Native Code) - stats: cpu=122796 blk=-1 wait=-1 java.lang.Thread.State: RUNNABLE at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) at java.net.SocketInputStream.read(SocketInputStream.java:171) at java.net.SocketInputStream.read(SocketInputStream.java:141) at oracle.net.ns.Packet.receive(Packet.java:311) at oracle.net.ns.DataPacket.receive(DataPacket.java:105) at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:305) at oracle.net.ns.NetInputStream.read(NetInputStream.java:249) at oracle.net.ns.NetInputStream.read(NetInputStream.java:171) at oracle.net.ns.NetInputStream.read(NetInputStream.java:89) at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:123) at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:79) at oracle.jdbc.driver.T4CMAREngineStream.unmarshalUB1(T4CMAREngineStream.java:429) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:397) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:587) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:225) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:53) at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:943) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1150) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:4798) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:4875) - locked oracle.jdbc.driver.T4CConnection@2ff33c0b
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.